github.com/jdgcs/sqlite3@v1.12.1-0.20210908114423-bc5f96e4dd51/internal/mptest/main_linux_s390x.go (about)

     1  // Code generated by 'ccgo -export-defines "" -o internal/mptest/main_linux_s390x.go -trace-translation-units testdata/sqlite-src-3350500/mptest/mptest.c -Itestdata/sqlite-amalgamation-3350500 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1', DO NOT EDIT.
     2  
     3  package main
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  
    11  	"modernc.org/libc"
    12  	"modernc.org/libc/sys/types"
    13  	"modernc.org/sqlite/lib"
    14  )
    15  
    16  var _ = math.Pi
    17  var _ reflect.Kind
    18  var _ atomic.Value
    19  var _ unsafe.Pointer
    20  var _ types.Size_t
    21  
    22  func main() { libc.Start(main1) }
    23  
    24  const (
    25  	BIG_ENDIAN                            = 4321
    26  	BUFSIZ                                = 8192
    27  	BYTE_ORDER                            = 4321
    28  	DEFAULT_TIMEOUT                       = 10000
    29  	E2BIG                                 = 7
    30  	EACCES                                = 13
    31  	EADDRINUSE                            = 98
    32  	EADDRNOTAVAIL                         = 99
    33  	EADV                                  = 68
    34  	EAFNOSUPPORT                          = 97
    35  	EAGAIN                                = 11
    36  	EALREADY                              = 114
    37  	EBADE                                 = 52
    38  	EBADF                                 = 9
    39  	EBADFD                                = 77
    40  	EBADMSG                               = 74
    41  	EBADR                                 = 53
    42  	EBADRQC                               = 56
    43  	EBADSLT                               = 57
    44  	EBFONT                                = 59
    45  	EBUSY                                 = 16
    46  	ECANCELED                             = 125
    47  	ECHILD                                = 10
    48  	ECHRNG                                = 44
    49  	ECOMM                                 = 70
    50  	ECONNABORTED                          = 103
    51  	ECONNREFUSED                          = 111
    52  	ECONNRESET                            = 104
    53  	EDEADLK                               = 35
    54  	EDEADLOCK                             = 35
    55  	EDESTADDRREQ                          = 89
    56  	EDOM                                  = 33
    57  	EDOTDOT                               = 73
    58  	EDQUOT                                = 122
    59  	EEXIST                                = 17
    60  	EFAULT                                = 14
    61  	EFBIG                                 = 27
    62  	EHOSTDOWN                             = 112
    63  	EHOSTUNREACH                          = 113
    64  	EHWPOISON                             = 133
    65  	EIDRM                                 = 43
    66  	EILSEQ                                = 84
    67  	EINPROGRESS                           = 115
    68  	EINTR                                 = 4
    69  	EINVAL                                = 22
    70  	EIO                                   = 5
    71  	EISCONN                               = 106
    72  	EISDIR                                = 21
    73  	EISNAM                                = 120
    74  	EKEYEXPIRED                           = 127
    75  	EKEYREJECTED                          = 129
    76  	EKEYREVOKED                           = 128
    77  	EL2HLT                                = 51
    78  	EL2NSYNC                              = 45
    79  	EL3HLT                                = 46
    80  	EL3RST                                = 47
    81  	ELIBACC                               = 79
    82  	ELIBBAD                               = 80
    83  	ELIBEXEC                              = 83
    84  	ELIBMAX                               = 82
    85  	ELIBSCN                               = 81
    86  	ELNRNG                                = 48
    87  	ELOOP                                 = 40
    88  	EMEDIUMTYPE                           = 124
    89  	EMFILE                                = 24
    90  	EMLINK                                = 31
    91  	EMSGSIZE                              = 90
    92  	EMULTIHOP                             = 72
    93  	ENAMETOOLONG                          = 36
    94  	ENAVAIL                               = 119
    95  	ENETDOWN                              = 100
    96  	ENETRESET                             = 102
    97  	ENETUNREACH                           = 101
    98  	ENFILE                                = 23
    99  	ENOANO                                = 55
   100  	ENOBUFS                               = 105
   101  	ENOCSI                                = 50
   102  	ENODATA                               = 61
   103  	ENODEV                                = 19
   104  	ENOENT                                = 2
   105  	ENOEXEC                               = 8
   106  	ENOKEY                                = 126
   107  	ENOLCK                                = 37
   108  	ENOLINK                               = 67
   109  	ENOMEDIUM                             = 123
   110  	ENOMEM                                = 12
   111  	ENOMSG                                = 42
   112  	ENONET                                = 64
   113  	ENOPKG                                = 65
   114  	ENOPROTOOPT                           = 92
   115  	ENOSPC                                = 28
   116  	ENOSR                                 = 63
   117  	ENOSTR                                = 60
   118  	ENOSYS                                = 38
   119  	ENOTBLK                               = 15
   120  	ENOTCONN                              = 107
   121  	ENOTDIR                               = 20
   122  	ENOTEMPTY                             = 39
   123  	ENOTNAM                               = 118
   124  	ENOTRECOVERABLE                       = 131
   125  	ENOTSOCK                              = 88
   126  	ENOTSUP                               = 95
   127  	ENOTTY                                = 25
   128  	ENOTUNIQ                              = 76
   129  	ENXIO                                 = 6
   130  	EOF                                   = -1
   131  	EOPNOTSUPP                            = 95
   132  	EOVERFLOW                             = 75
   133  	EOWNERDEAD                            = 130
   134  	EPERM                                 = 1
   135  	EPFNOSUPPORT                          = 96
   136  	EPIPE                                 = 32
   137  	EPROTO                                = 71
   138  	EPROTONOSUPPORT                       = 93
   139  	EPROTOTYPE                            = 91
   140  	ERANGE                                = 34
   141  	EREMCHG                               = 78
   142  	EREMOTE                               = 66
   143  	EREMOTEIO                             = 121
   144  	ERESTART                              = 85
   145  	ERFKILL                               = 132
   146  	EROFS                                 = 30
   147  	ESHUTDOWN                             = 108
   148  	ESOCKTNOSUPPORT                       = 94
   149  	ESPIPE                                = 29
   150  	ESRCH                                 = 3
   151  	ESRMNT                                = 69
   152  	ESTALE                                = 116
   153  	ESTRPIPE                              = 86
   154  	ETIME                                 = 62
   155  	ETIMEDOUT                             = 110
   156  	ETOOMANYREFS                          = 109
   157  	ETXTBSY                               = 26
   158  	EUCLEAN                               = 117
   159  	EUNATCH                               = 49
   160  	EUSERS                                = 87
   161  	EWOULDBLOCK                           = 11
   162  	EXDEV                                 = 18
   163  	EXFULL                                = 54
   164  	EXIT_FAILURE                          = 1
   165  	EXIT_SUCCESS                          = 0
   166  	FD_SETSIZE                            = 1024
   167  	FILENAME_MAX                          = 4096
   168  	FOPEN_MAX                             = 16
   169  	FTS5_TOKENIZE_AUX                     = 0x0008
   170  	FTS5_TOKENIZE_DOCUMENT                = 0x0004
   171  	FTS5_TOKENIZE_PREFIX                  = 0x0002
   172  	FTS5_TOKENIZE_QUERY                   = 0x0001
   173  	FTS5_TOKEN_COLOCATED                  = 0x0001
   174  	FULLY_WITHIN                          = 2
   175  	F_LOCK                                = 1
   176  	F_OK                                  = 0
   177  	F_TEST                                = 3
   178  	F_TLOCK                               = 2
   179  	F_ULOCK                               = 0
   180  	HAVE_USLEEP                           = 1
   181  	LITTLE_ENDIAN                         = 1234
   182  	L_INCR                                = 1
   183  	L_SET                                 = 0
   184  	L_XTND                                = 2
   185  	L_ctermid                             = 9
   186  	L_tmpnam                              = 20
   187  	MX_ARG                                = 2
   188  	NDEBUG                                = 1
   189  	NOT_WITHIN                            = 0
   190  	PARTLY_WITHIN                         = 1
   191  	PDP_ENDIAN                            = 3412
   192  	P_tmpdir                              = "/tmp"
   193  	RAND_MAX                              = 2147483647
   194  	R_OK                                  = 4
   195  	SEEK_CUR                              = 1
   196  	SEEK_END                              = 2
   197  	SEEK_SET                              = 0
   198  	SQLITE3_H                             = 0
   199  	SQLITE3_TEXT                          = 3
   200  	SQLITE_ABORT                          = 4
   201  	SQLITE_ABORT_ROLLBACK                 = 516
   202  	SQLITE_ACCESS_EXISTS                  = 0
   203  	SQLITE_ACCESS_READ                    = 2
   204  	SQLITE_ACCESS_READWRITE               = 1
   205  	SQLITE_ALTER_TABLE                    = 26
   206  	SQLITE_ANALYZE                        = 28
   207  	SQLITE_ANY                            = 5
   208  	SQLITE_API                            = 0
   209  	SQLITE_APICALL                        = 0
   210  	SQLITE_ATTACH                         = 24
   211  	SQLITE_AUTH                           = 23
   212  	SQLITE_AUTH_USER                      = 279
   213  	SQLITE_BLOB                           = 4
   214  	SQLITE_BUSY                           = 5
   215  	SQLITE_BUSY_RECOVERY                  = 261
   216  	SQLITE_BUSY_SNAPSHOT                  = 517
   217  	SQLITE_BUSY_TIMEOUT                   = 773
   218  	SQLITE_CALLBACK                       = 0
   219  	SQLITE_CANTOPEN                       = 14
   220  	SQLITE_CANTOPEN_CONVPATH              = 1038
   221  	SQLITE_CANTOPEN_DIRTYWAL              = 1294
   222  	SQLITE_CANTOPEN_FULLPATH              = 782
   223  	SQLITE_CANTOPEN_ISDIR                 = 526
   224  	SQLITE_CANTOPEN_NOTEMPDIR             = 270
   225  	SQLITE_CANTOPEN_SYMLINK               = 1550
   226  	SQLITE_CDECL                          = 0
   227  	SQLITE_CHECKPOINT_FULL                = 1
   228  	SQLITE_CHECKPOINT_PASSIVE             = 0
   229  	SQLITE_CHECKPOINT_RESTART             = 2
   230  	SQLITE_CHECKPOINT_TRUNCATE            = 3
   231  	SQLITE_CONFIG_COVERING_INDEX_SCAN     = 20
   232  	SQLITE_CONFIG_GETMALLOC               = 5
   233  	SQLITE_CONFIG_GETMUTEX                = 11
   234  	SQLITE_CONFIG_GETPCACHE               = 15
   235  	SQLITE_CONFIG_GETPCACHE2              = 19
   236  	SQLITE_CONFIG_HEAP                    = 8
   237  	SQLITE_CONFIG_LOG                     = 16
   238  	SQLITE_CONFIG_LOOKASIDE               = 13
   239  	SQLITE_CONFIG_MALLOC                  = 4
   240  	SQLITE_CONFIG_MEMDB_MAXSIZE           = 29
   241  	SQLITE_CONFIG_MEMSTATUS               = 9
   242  	SQLITE_CONFIG_MMAP_SIZE               = 22
   243  	SQLITE_CONFIG_MULTITHREAD             = 2
   244  	SQLITE_CONFIG_MUTEX                   = 10
   245  	SQLITE_CONFIG_PAGECACHE               = 7
   246  	SQLITE_CONFIG_PCACHE                  = 14
   247  	SQLITE_CONFIG_PCACHE2                 = 18
   248  	SQLITE_CONFIG_PCACHE_HDRSZ            = 24
   249  	SQLITE_CONFIG_PMASZ                   = 25
   250  	SQLITE_CONFIG_SCRATCH                 = 6
   251  	SQLITE_CONFIG_SERIALIZED              = 3
   252  	SQLITE_CONFIG_SINGLETHREAD            = 1
   253  	SQLITE_CONFIG_SMALL_MALLOC            = 27
   254  	SQLITE_CONFIG_SORTERREF_SIZE          = 28
   255  	SQLITE_CONFIG_SQLLOG                  = 21
   256  	SQLITE_CONFIG_STMTJRNL_SPILL          = 26
   257  	SQLITE_CONFIG_URI                     = 17
   258  	SQLITE_CONFIG_WIN32_HEAPSIZE          = 23
   259  	SQLITE_CONSTRAINT                     = 19
   260  	SQLITE_CONSTRAINT_CHECK               = 275
   261  	SQLITE_CONSTRAINT_COMMITHOOK          = 531
   262  	SQLITE_CONSTRAINT_FOREIGNKEY          = 787
   263  	SQLITE_CONSTRAINT_FUNCTION            = 1043
   264  	SQLITE_CONSTRAINT_NOTNULL             = 1299
   265  	SQLITE_CONSTRAINT_PINNED              = 2835
   266  	SQLITE_CONSTRAINT_PRIMARYKEY          = 1555
   267  	SQLITE_CONSTRAINT_ROWID               = 2579
   268  	SQLITE_CONSTRAINT_TRIGGER             = 1811
   269  	SQLITE_CONSTRAINT_UNIQUE              = 2067
   270  	SQLITE_CONSTRAINT_VTAB                = 2323
   271  	SQLITE_COPY                           = 0
   272  	SQLITE_CORE                           = 1
   273  	SQLITE_CORRUPT                        = 11
   274  	SQLITE_CORRUPT_INDEX                  = 779
   275  	SQLITE_CORRUPT_SEQUENCE               = 523
   276  	SQLITE_CORRUPT_VTAB                   = 267
   277  	SQLITE_CREATE_INDEX                   = 1
   278  	SQLITE_CREATE_TABLE                   = 2
   279  	SQLITE_CREATE_TEMP_INDEX              = 3
   280  	SQLITE_CREATE_TEMP_TABLE              = 4
   281  	SQLITE_CREATE_TEMP_TRIGGER            = 5
   282  	SQLITE_CREATE_TEMP_VIEW               = 6
   283  	SQLITE_CREATE_TRIGGER                 = 7
   284  	SQLITE_CREATE_VIEW                    = 8
   285  	SQLITE_CREATE_VTABLE                  = 29
   286  	SQLITE_DBCONFIG_DEFENSIVE             = 1010
   287  	SQLITE_DBCONFIG_DQS_DDL               = 1014
   288  	SQLITE_DBCONFIG_DQS_DML               = 1013
   289  	SQLITE_DBCONFIG_ENABLE_FKEY           = 1002
   290  	SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004
   291  	SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005
   292  	SQLITE_DBCONFIG_ENABLE_QPSG           = 1007
   293  	SQLITE_DBCONFIG_ENABLE_TRIGGER        = 1003
   294  	SQLITE_DBCONFIG_ENABLE_VIEW           = 1015
   295  	SQLITE_DBCONFIG_LEGACY_ALTER_TABLE    = 1012
   296  	SQLITE_DBCONFIG_LEGACY_FILE_FORMAT    = 1016
   297  	SQLITE_DBCONFIG_LOOKASIDE             = 1001
   298  	SQLITE_DBCONFIG_MAINDBNAME            = 1000
   299  	SQLITE_DBCONFIG_MAX                   = 1017
   300  	SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE      = 1006
   301  	SQLITE_DBCONFIG_RESET_DATABASE        = 1009
   302  	SQLITE_DBCONFIG_TRIGGER_EQP           = 1008
   303  	SQLITE_DBCONFIG_TRUSTED_SCHEMA        = 1017
   304  	SQLITE_DBCONFIG_WRITABLE_SCHEMA       = 1011
   305  	SQLITE_DBSTATUS_CACHE_HIT             = 7
   306  	SQLITE_DBSTATUS_CACHE_MISS            = 8
   307  	SQLITE_DBSTATUS_CACHE_SPILL           = 12
   308  	SQLITE_DBSTATUS_CACHE_USED            = 1
   309  	SQLITE_DBSTATUS_CACHE_USED_SHARED     = 11
   310  	SQLITE_DBSTATUS_CACHE_WRITE           = 9
   311  	SQLITE_DBSTATUS_DEFERRED_FKS          = 10
   312  	SQLITE_DBSTATUS_LOOKASIDE_HIT         = 4
   313  	SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL   = 6
   314  	SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE   = 5
   315  	SQLITE_DBSTATUS_LOOKASIDE_USED        = 0
   316  	SQLITE_DBSTATUS_MAX                   = 12
   317  	SQLITE_DBSTATUS_SCHEMA_USED           = 2
   318  	SQLITE_DBSTATUS_STMT_USED             = 3
   319  	SQLITE_DELETE                         = 9
   320  	SQLITE_DENY                           = 1
   321  	SQLITE_DEPRECATED                     = 0
   322  	SQLITE_DESERIALIZE_FREEONCLOSE        = 1
   323  	SQLITE_DESERIALIZE_READONLY           = 4
   324  	SQLITE_DESERIALIZE_RESIZEABLE         = 2
   325  	SQLITE_DETACH                         = 25
   326  	SQLITE_DETERMINISTIC                  = 0x000000800
   327  	SQLITE_DIRECTONLY                     = 0x000080000
   328  	SQLITE_DONE                           = 101
   329  	SQLITE_DROP_INDEX                     = 10
   330  	SQLITE_DROP_TABLE                     = 11
   331  	SQLITE_DROP_TEMP_INDEX                = 12
   332  	SQLITE_DROP_TEMP_TABLE                = 13
   333  	SQLITE_DROP_TEMP_TRIGGER              = 14
   334  	SQLITE_DROP_TEMP_VIEW                 = 15
   335  	SQLITE_DROP_TRIGGER                   = 16
   336  	SQLITE_DROP_VIEW                      = 17
   337  	SQLITE_DROP_VTABLE                    = 30
   338  	SQLITE_EMPTY                          = 16
   339  	SQLITE_ENABLE_COLUMN_METADATA         = 1
   340  	SQLITE_ENABLE_FTS5                    = 1
   341  	SQLITE_ENABLE_GEOPOLY                 = 1
   342  	SQLITE_ENABLE_JSON1                   = 1
   343  	SQLITE_ENABLE_MEMORY_MANAGEMENT       = 1
   344  	SQLITE_ENABLE_OFFSET_SQL_FUNC         = 1
   345  	SQLITE_ENABLE_PREUPDATE_HOOK          = 1
   346  	SQLITE_ENABLE_RBU                     = 1
   347  	SQLITE_ENABLE_RTREE                   = 1
   348  	SQLITE_ENABLE_SNAPSHOT                = 1
   349  	SQLITE_ENABLE_STAT4                   = 1
   350  	SQLITE_ENABLE_UNLOCK_NOTIFY           = 1
   351  	SQLITE_ERROR                          = 1
   352  	SQLITE_ERROR_MISSING_COLLSEQ          = 257
   353  	SQLITE_ERROR_RETRY                    = 513
   354  	SQLITE_ERROR_SNAPSHOT                 = 769
   355  	SQLITE_EXPERIMENTAL                   = 0
   356  	SQLITE_FAIL                           = 3
   357  	SQLITE_FCNTL_BEGIN_ATOMIC_WRITE       = 31
   358  	SQLITE_FCNTL_BUSYHANDLER              = 15
   359  	SQLITE_FCNTL_CHUNK_SIZE               = 6
   360  	SQLITE_FCNTL_CKPT_DONE                = 37
   361  	SQLITE_FCNTL_CKPT_START               = 39
   362  	SQLITE_FCNTL_COMMIT_ATOMIC_WRITE      = 32
   363  	SQLITE_FCNTL_COMMIT_PHASETWO          = 22
   364  	SQLITE_FCNTL_DATA_VERSION             = 35
   365  	SQLITE_FCNTL_FILE_POINTER             = 7
   366  	SQLITE_FCNTL_GET_LOCKPROXYFILE        = 2
   367  	SQLITE_FCNTL_HAS_MOVED                = 20
   368  	SQLITE_FCNTL_JOURNAL_POINTER          = 28
   369  	SQLITE_FCNTL_LAST_ERRNO               = 4
   370  	SQLITE_FCNTL_LOCKSTATE                = 1
   371  	SQLITE_FCNTL_LOCK_TIMEOUT             = 34
   372  	SQLITE_FCNTL_MMAP_SIZE                = 18
   373  	SQLITE_FCNTL_OVERWRITE                = 11
   374  	SQLITE_FCNTL_PDB                      = 30
   375  	SQLITE_FCNTL_PERSIST_WAL              = 10
   376  	SQLITE_FCNTL_POWERSAFE_OVERWRITE      = 13
   377  	SQLITE_FCNTL_PRAGMA                   = 14
   378  	SQLITE_FCNTL_RBU                      = 26
   379  	SQLITE_FCNTL_RESERVE_BYTES            = 38
   380  	SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE    = 33
   381  	SQLITE_FCNTL_SET_LOCKPROXYFILE        = 3
   382  	SQLITE_FCNTL_SIZE_HINT                = 5
   383  	SQLITE_FCNTL_SIZE_LIMIT               = 36
   384  	SQLITE_FCNTL_SYNC                     = 21
   385  	SQLITE_FCNTL_SYNC_OMITTED             = 8
   386  	SQLITE_FCNTL_TEMPFILENAME             = 16
   387  	SQLITE_FCNTL_TRACE                    = 19
   388  	SQLITE_FCNTL_VFSNAME                  = 12
   389  	SQLITE_FCNTL_VFS_POINTER              = 27
   390  	SQLITE_FCNTL_WAL_BLOCK                = 24
   391  	SQLITE_FCNTL_WIN32_AV_RETRY           = 9
   392  	SQLITE_FCNTL_WIN32_GET_HANDLE         = 29
   393  	SQLITE_FCNTL_WIN32_SET_HANDLE         = 23
   394  	SQLITE_FCNTL_ZIPVFS                   = 25
   395  	SQLITE_FLOAT                          = 2
   396  	SQLITE_FORMAT                         = 24
   397  	SQLITE_FULL                           = 13
   398  	SQLITE_FUNCTION                       = 31
   399  	SQLITE_GET_LOCKPROXYFILE              = 2
   400  	SQLITE_IGNORE                         = 2
   401  	SQLITE_INDEX_CONSTRAINT_EQ            = 2
   402  	SQLITE_INDEX_CONSTRAINT_FUNCTION      = 150
   403  	SQLITE_INDEX_CONSTRAINT_GE            = 32
   404  	SQLITE_INDEX_CONSTRAINT_GLOB          = 66
   405  	SQLITE_INDEX_CONSTRAINT_GT            = 4
   406  	SQLITE_INDEX_CONSTRAINT_IS            = 72
   407  	SQLITE_INDEX_CONSTRAINT_ISNOT         = 69
   408  	SQLITE_INDEX_CONSTRAINT_ISNOTNULL     = 70
   409  	SQLITE_INDEX_CONSTRAINT_ISNULL        = 71
   410  	SQLITE_INDEX_CONSTRAINT_LE            = 8
   411  	SQLITE_INDEX_CONSTRAINT_LIKE          = 65
   412  	SQLITE_INDEX_CONSTRAINT_LT            = 16
   413  	SQLITE_INDEX_CONSTRAINT_MATCH         = 64
   414  	SQLITE_INDEX_CONSTRAINT_NE            = 68
   415  	SQLITE_INDEX_CONSTRAINT_REGEXP        = 67
   416  	SQLITE_INDEX_SCAN_UNIQUE              = 1
   417  	SQLITE_INNOCUOUS                      = 0x000200000
   418  	SQLITE_INSERT                         = 18
   419  	SQLITE_INTEGER                        = 1
   420  	SQLITE_INTERNAL                       = 2
   421  	SQLITE_INTERRUPT                      = 9
   422  	SQLITE_IOCAP_ATOMIC                   = 0x00000001
   423  	SQLITE_IOCAP_ATOMIC16K                = 0x00000040
   424  	SQLITE_IOCAP_ATOMIC1K                 = 0x00000004
   425  	SQLITE_IOCAP_ATOMIC2K                 = 0x00000008
   426  	SQLITE_IOCAP_ATOMIC32K                = 0x00000080
   427  	SQLITE_IOCAP_ATOMIC4K                 = 0x00000010
   428  	SQLITE_IOCAP_ATOMIC512                = 0x00000002
   429  	SQLITE_IOCAP_ATOMIC64K                = 0x00000100
   430  	SQLITE_IOCAP_ATOMIC8K                 = 0x00000020
   431  	SQLITE_IOCAP_BATCH_ATOMIC             = 0x00004000
   432  	SQLITE_IOCAP_IMMUTABLE                = 0x00002000
   433  	SQLITE_IOCAP_POWERSAFE_OVERWRITE      = 0x00001000
   434  	SQLITE_IOCAP_SAFE_APPEND              = 0x00000200
   435  	SQLITE_IOCAP_SEQUENTIAL               = 0x00000400
   436  	SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN    = 0x00000800
   437  	SQLITE_IOERR                          = 10
   438  	SQLITE_IOERR_ACCESS                   = 3338
   439  	SQLITE_IOERR_AUTH                     = 7178
   440  	SQLITE_IOERR_BEGIN_ATOMIC             = 7434
   441  	SQLITE_IOERR_BLOCKED                  = 2826
   442  	SQLITE_IOERR_CHECKRESERVEDLOCK        = 3594
   443  	SQLITE_IOERR_CLOSE                    = 4106
   444  	SQLITE_IOERR_COMMIT_ATOMIC            = 7690
   445  	SQLITE_IOERR_CONVPATH                 = 6666
   446  	SQLITE_IOERR_CORRUPTFS                = 8458
   447  	SQLITE_IOERR_DATA                     = 8202
   448  	SQLITE_IOERR_DELETE                   = 2570
   449  	SQLITE_IOERR_DELETE_NOENT             = 5898
   450  	SQLITE_IOERR_DIR_CLOSE                = 4362
   451  	SQLITE_IOERR_DIR_FSYNC                = 1290
   452  	SQLITE_IOERR_FSTAT                    = 1802
   453  	SQLITE_IOERR_FSYNC                    = 1034
   454  	SQLITE_IOERR_GETTEMPPATH              = 6410
   455  	SQLITE_IOERR_LOCK                     = 3850
   456  	SQLITE_IOERR_MMAP                     = 6154
   457  	SQLITE_IOERR_NOMEM                    = 3082
   458  	SQLITE_IOERR_RDLOCK                   = 2314
   459  	SQLITE_IOERR_READ                     = 266
   460  	SQLITE_IOERR_ROLLBACK_ATOMIC          = 7946
   461  	SQLITE_IOERR_SEEK                     = 5642
   462  	SQLITE_IOERR_SHMLOCK                  = 5130
   463  	SQLITE_IOERR_SHMMAP                   = 5386
   464  	SQLITE_IOERR_SHMOPEN                  = 4618
   465  	SQLITE_IOERR_SHMSIZE                  = 4874
   466  	SQLITE_IOERR_SHORT_READ               = 522
   467  	SQLITE_IOERR_TRUNCATE                 = 1546
   468  	SQLITE_IOERR_UNLOCK                   = 2058
   469  	SQLITE_IOERR_VNODE                    = 6922
   470  	SQLITE_IOERR_WRITE                    = 778
   471  	SQLITE_LAST_ERRNO                     = 4
   472  	SQLITE_LIKE_DOESNT_MATCH_BLOBS        = 1
   473  	SQLITE_LIMIT_ATTACHED                 = 7
   474  	SQLITE_LIMIT_COLUMN                   = 2
   475  	SQLITE_LIMIT_COMPOUND_SELECT          = 4
   476  	SQLITE_LIMIT_EXPR_DEPTH               = 3
   477  	SQLITE_LIMIT_FUNCTION_ARG             = 6
   478  	SQLITE_LIMIT_LENGTH                   = 0
   479  	SQLITE_LIMIT_LIKE_PATTERN_LENGTH      = 8
   480  	SQLITE_LIMIT_SQL_LENGTH               = 1
   481  	SQLITE_LIMIT_TRIGGER_DEPTH            = 10
   482  	SQLITE_LIMIT_VARIABLE_NUMBER          = 9
   483  	SQLITE_LIMIT_VDBE_OP                  = 5
   484  	SQLITE_LIMIT_WORKER_THREADS           = 11
   485  	SQLITE_LOCKED                         = 6
   486  	SQLITE_LOCKED_SHAREDCACHE             = 262
   487  	SQLITE_LOCKED_VTAB                    = 518
   488  	SQLITE_LOCK_EXCLUSIVE                 = 4
   489  	SQLITE_LOCK_NONE                      = 0
   490  	SQLITE_LOCK_PENDING                   = 3
   491  	SQLITE_LOCK_RESERVED                  = 2
   492  	SQLITE_LOCK_SHARED                    = 1
   493  	SQLITE_MISMATCH                       = 20
   494  	SQLITE_MISUSE                         = 21
   495  	SQLITE_MUTEX_APPDEF                   = 1
   496  	SQLITE_MUTEX_FAST                     = 0
   497  	SQLITE_MUTEX_NOOP                     = 1
   498  	SQLITE_MUTEX_RECURSIVE                = 1
   499  	SQLITE_MUTEX_STATIC_APP1              = 8
   500  	SQLITE_MUTEX_STATIC_APP2              = 9
   501  	SQLITE_MUTEX_STATIC_APP3              = 10
   502  	SQLITE_MUTEX_STATIC_LRU               = 6
   503  	SQLITE_MUTEX_STATIC_LRU2              = 7
   504  	SQLITE_MUTEX_STATIC_MAIN              = 2
   505  	SQLITE_MUTEX_STATIC_MASTER            = 2
   506  	SQLITE_MUTEX_STATIC_MEM               = 3
   507  	SQLITE_MUTEX_STATIC_MEM2              = 4
   508  	SQLITE_MUTEX_STATIC_OPEN              = 4
   509  	SQLITE_MUTEX_STATIC_PMEM              = 7
   510  	SQLITE_MUTEX_STATIC_PRNG              = 5
   511  	SQLITE_MUTEX_STATIC_VFS1              = 11
   512  	SQLITE_MUTEX_STATIC_VFS2              = 12
   513  	SQLITE_MUTEX_STATIC_VFS3              = 13
   514  	SQLITE_NOLFS                          = 22
   515  	SQLITE_NOMEM                          = 7
   516  	SQLITE_NOTADB                         = 26
   517  	SQLITE_NOTFOUND                       = 12
   518  	SQLITE_NOTICE                         = 27
   519  	SQLITE_NOTICE_RECOVER_ROLLBACK        = 539
   520  	SQLITE_NOTICE_RECOVER_WAL             = 283
   521  	SQLITE_NULL                           = 5
   522  	SQLITE_OK                             = 0
   523  	SQLITE_OK_LOAD_PERMANENTLY            = 256
   524  	SQLITE_OK_SYMLINK                     = 512
   525  	SQLITE_OPEN_AUTOPROXY                 = 0x00000020
   526  	SQLITE_OPEN_CREATE                    = 0x00000004
   527  	SQLITE_OPEN_DELETEONCLOSE             = 0x00000008
   528  	SQLITE_OPEN_EXCLUSIVE                 = 0x00000010
   529  	SQLITE_OPEN_FULLMUTEX                 = 0x00010000
   530  	SQLITE_OPEN_MAIN_DB                   = 0x00000100
   531  	SQLITE_OPEN_MAIN_JOURNAL              = 0x00000800
   532  	SQLITE_OPEN_MASTER_JOURNAL            = 0x00004000
   533  	SQLITE_OPEN_MEMORY                    = 0x00000080
   534  	SQLITE_OPEN_NOFOLLOW                  = 0x01000000
   535  	SQLITE_OPEN_NOMUTEX                   = 0x00008000
   536  	SQLITE_OPEN_PRIVATECACHE              = 0x00040000
   537  	SQLITE_OPEN_READONLY                  = 0x00000001
   538  	SQLITE_OPEN_READWRITE                 = 0x00000002
   539  	SQLITE_OPEN_SHAREDCACHE               = 0x00020000
   540  	SQLITE_OPEN_SUBJOURNAL                = 0x00002000
   541  	SQLITE_OPEN_SUPER_JOURNAL             = 0x00004000
   542  	SQLITE_OPEN_TEMP_DB                   = 0x00000200
   543  	SQLITE_OPEN_TEMP_JOURNAL              = 0x00001000
   544  	SQLITE_OPEN_TRANSIENT_DB              = 0x00000400
   545  	SQLITE_OPEN_URI                       = 0x00000040
   546  	SQLITE_OPEN_WAL                       = 0x00080000
   547  	SQLITE_OS_UNIX                        = 1
   548  	SQLITE_PERM                           = 3
   549  	SQLITE_PRAGMA                         = 19
   550  	SQLITE_PREPARE_NORMALIZE              = 0x02
   551  	SQLITE_PREPARE_NO_VTAB                = 0x04
   552  	SQLITE_PREPARE_PERSISTENT             = 0x01
   553  	SQLITE_PROTOCOL                       = 15
   554  	SQLITE_RANGE                          = 25
   555  	SQLITE_READ                           = 20
   556  	SQLITE_READONLY                       = 8
   557  	SQLITE_READONLY_CANTINIT              = 1288
   558  	SQLITE_READONLY_CANTLOCK              = 520
   559  	SQLITE_READONLY_DBMOVED               = 1032
   560  	SQLITE_READONLY_DIRECTORY             = 1544
   561  	SQLITE_READONLY_RECOVERY              = 264
   562  	SQLITE_READONLY_ROLLBACK              = 776
   563  	SQLITE_RECURSIVE                      = 33
   564  	SQLITE_REINDEX                        = 27
   565  	SQLITE_REPLACE                        = 5
   566  	SQLITE_ROLLBACK                       = 1
   567  	SQLITE_ROW                            = 100
   568  	SQLITE_SAVEPOINT                      = 32
   569  	SQLITE_SCANSTAT_EST                   = 2
   570  	SQLITE_SCANSTAT_EXPLAIN               = 4
   571  	SQLITE_SCANSTAT_NAME                  = 3
   572  	SQLITE_SCANSTAT_NLOOP                 = 0
   573  	SQLITE_SCANSTAT_NVISIT                = 1
   574  	SQLITE_SCANSTAT_SELECTID              = 5
   575  	SQLITE_SCHEMA                         = 17
   576  	SQLITE_SELECT                         = 21
   577  	SQLITE_SERIALIZE_NOCOPY               = 0x001
   578  	SQLITE_SET_LOCKPROXYFILE              = 3
   579  	SQLITE_SHM_EXCLUSIVE                  = 8
   580  	SQLITE_SHM_LOCK                       = 2
   581  	SQLITE_SHM_NLOCK                      = 8
   582  	SQLITE_SHM_SHARED                     = 4
   583  	SQLITE_SHM_UNLOCK                     = 1
   584  	SQLITE_SOUNDEX                        = 1
   585  	SQLITE_SOURCE_ID                      = "2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886"
   586  	SQLITE_STATUS_MALLOC_COUNT            = 9
   587  	SQLITE_STATUS_MALLOC_SIZE             = 5
   588  	SQLITE_STATUS_MEMORY_USED             = 0
   589  	SQLITE_STATUS_PAGECACHE_OVERFLOW      = 2
   590  	SQLITE_STATUS_PAGECACHE_SIZE          = 7
   591  	SQLITE_STATUS_PAGECACHE_USED          = 1
   592  	SQLITE_STATUS_PARSER_STACK            = 6
   593  	SQLITE_STATUS_SCRATCH_OVERFLOW        = 4
   594  	SQLITE_STATUS_SCRATCH_SIZE            = 8
   595  	SQLITE_STATUS_SCRATCH_USED            = 3
   596  	SQLITE_STDCALL                        = 0
   597  	SQLITE_STMTSTATUS_AUTOINDEX           = 3
   598  	SQLITE_STMTSTATUS_FULLSCAN_STEP       = 1
   599  	SQLITE_STMTSTATUS_MEMUSED             = 99
   600  	SQLITE_STMTSTATUS_REPREPARE           = 5
   601  	SQLITE_STMTSTATUS_RUN                 = 6
   602  	SQLITE_STMTSTATUS_SORT                = 2
   603  	SQLITE_STMTSTATUS_VM_STEP             = 4
   604  	SQLITE_SUBTYPE                        = 0x000100000
   605  	SQLITE_SYNC_DATAONLY                  = 0x00010
   606  	SQLITE_SYNC_FULL                      = 0x00003
   607  	SQLITE_SYNC_NORMAL                    = 0x00002
   608  	SQLITE_SYSAPI                         = 0
   609  	SQLITE_TESTCTRL_ALWAYS                = 13
   610  	SQLITE_TESTCTRL_ASSERT                = 12
   611  	SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS   = 10
   612  	SQLITE_TESTCTRL_BITVEC_TEST           = 8
   613  	SQLITE_TESTCTRL_BYTEORDER             = 22
   614  	SQLITE_TESTCTRL_EXPLAIN_STMT          = 19
   615  	SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS   = 29
   616  	SQLITE_TESTCTRL_FAULT_INSTALL         = 9
   617  	SQLITE_TESTCTRL_FIRST                 = 5
   618  	SQLITE_TESTCTRL_IMPOSTER              = 25
   619  	SQLITE_TESTCTRL_INTERNAL_FUNCTIONS    = 17
   620  	SQLITE_TESTCTRL_ISINIT                = 23
   621  	SQLITE_TESTCTRL_ISKEYWORD             = 16
   622  	SQLITE_TESTCTRL_LAST                  = 31
   623  	SQLITE_TESTCTRL_LOCALTIME_FAULT       = 18
   624  	SQLITE_TESTCTRL_NEVER_CORRUPT         = 20
   625  	SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD  = 19
   626  	SQLITE_TESTCTRL_OPTIMIZATIONS         = 15
   627  	SQLITE_TESTCTRL_PARSER_COVERAGE       = 26
   628  	SQLITE_TESTCTRL_PENDING_BYTE          = 11
   629  	SQLITE_TESTCTRL_PRNG_RESET            = 7
   630  	SQLITE_TESTCTRL_PRNG_RESTORE          = 6
   631  	SQLITE_TESTCTRL_PRNG_SAVE             = 5
   632  	SQLITE_TESTCTRL_PRNG_SEED             = 28
   633  	SQLITE_TESTCTRL_RESERVE               = 14
   634  	SQLITE_TESTCTRL_RESULT_INTREAL        = 27
   635  	SQLITE_TESTCTRL_SCRATCHMALLOC         = 17
   636  	SQLITE_TESTCTRL_SEEK_COUNT            = 30
   637  	SQLITE_TESTCTRL_SORTER_MMAP           = 24
   638  	SQLITE_TESTCTRL_TRACEFLAGS            = 31
   639  	SQLITE_TESTCTRL_VDBE_COVERAGE         = 21
   640  	SQLITE_TEXT                           = 3
   641  	SQLITE_THREADSAFE                     = 1
   642  	SQLITE_TOOBIG                         = 18
   643  	SQLITE_TRACE_CLOSE                    = 0x08
   644  	SQLITE_TRACE_PROFILE                  = 0x02
   645  	SQLITE_TRACE_ROW                      = 0x04
   646  	SQLITE_TRACE_STMT                     = 0x01
   647  	SQLITE_TRANSACTION                    = 22
   648  	SQLITE_TXN_NONE                       = 0
   649  	SQLITE_TXN_READ                       = 1
   650  	SQLITE_TXN_WRITE                      = 2
   651  	SQLITE_UPDATE                         = 23
   652  	SQLITE_UTF16                          = 4
   653  	SQLITE_UTF16BE                        = 3
   654  	SQLITE_UTF16LE                        = 2
   655  	SQLITE_UTF16_ALIGNED                  = 8
   656  	SQLITE_UTF8                           = 1
   657  	SQLITE_VERSION                        = "3.35.5"
   658  	SQLITE_VERSION_NUMBER                 = 3035005
   659  	SQLITE_VTAB_CONSTRAINT_SUPPORT        = 1
   660  	SQLITE_VTAB_DIRECTONLY                = 3
   661  	SQLITE_VTAB_INNOCUOUS                 = 2
   662  	SQLITE_WARNING                        = 28
   663  	SQLITE_WARNING_AUTOINDEX              = 284
   664  	SQLITE_WIN32_DATA_DIRECTORY_TYPE      = 1
   665  	SQLITE_WIN32_TEMP_DIRECTORY_TYPE      = 2
   666  	STDERR_FILENO                         = 2
   667  	STDIN_FILENO                          = 0
   668  	STDOUT_FILENO                         = 1
   669  	TMP_MAX                               = 238328
   670  	WCONTINUED                            = 8
   671  	WEXITED                               = 4
   672  	WNOHANG                               = 1
   673  	WNOWAIT                               = 0x01000000
   674  	WSTOPPED                              = 2
   675  	WUNTRACED                             = 2
   676  	W_OK                                  = 2
   677  	X_OK                                  = 1
   678  	X_ALLOCA_H                            = 1
   679  	X_ANSI_STDARG_H_                      = 0
   680  	X_ASM_GENERIC_ERRNO_BASE_H            = 0
   681  	X_ASM_GENERIC_ERRNO_H                 = 0
   682  	X_ASSERT_H                            = 1
   683  	X_ATFILE_SOURCE                       = 1
   684  	X_BITS_BYTESWAP_H                     = 1
   685  	X_BITS_ERRNO_H                        = 1
   686  	X_BITS_FLOATN_COMMON_H                = 0
   687  	X_BITS_FLOATN_H                       = 0
   688  	X_BITS_POSIX_OPT_H                    = 1
   689  	X_BITS_PTHREADTYPES_ARCH_H            = 1
   690  	X_BITS_PTHREADTYPES_COMMON_H          = 1
   691  	X_BITS_STDINT_INTN_H                  = 1
   692  	X_BITS_STDIO_LIM_H                    = 1
   693  	X_BITS_TYPESIZES_H                    = 1
   694  	X_BITS_TYPES_H                        = 1
   695  	X_BITS_TYPES_LOCALE_T_H               = 1
   696  	X_BITS_TYPES___LOCALE_T_H             = 1
   697  	X_BITS_UINTN_IDENTITY_H               = 1
   698  	X_BSD_SIZE_T_                         = 0
   699  	X_BSD_SIZE_T_DEFINED_                 = 0
   700  	X_CTYPE_H                             = 1
   701  	X_DEFAULT_SOURCE                      = 1
   702  	X_ENDIAN_H                            = 1
   703  	X_ERRNO_H                             = 1
   704  	X_FEATURES_H                          = 1
   705  	X_FILE_OFFSET_BITS                    = 64
   706  	X_FTS5_H                              = 0
   707  	X_GCC_SIZE_T                          = 0
   708  	X_GCC_WCHAR_T                         = 0
   709  	X_GETOPT_CORE_H                       = 1
   710  	X_GETOPT_POSIX_H                      = 1
   711  	X_IOFBF                               = 0
   712  	X_IOLBF                               = 1
   713  	X_IONBF                               = 2
   714  	X_IO_EOF_SEEN                         = 0x0010
   715  	X_IO_ERR_SEEN                         = 0x0020
   716  	X_IO_USER_LOCK                        = 0x8000
   717  	X_LFS64_ASYNCHRONOUS_IO               = 1
   718  	X_LFS64_LARGEFILE                     = 1
   719  	X_LFS64_STDIO                         = 1
   720  	X_LFS_ASYNCHRONOUS_IO                 = 1
   721  	X_LFS_LARGEFILE                       = 1
   722  	X_LP64                                = 1
   723  	X_POSIX2_CHAR_TERM                    = 200809
   724  	X_POSIX2_C_BIND                       = 200809
   725  	X_POSIX2_C_DEV                        = 200809
   726  	X_POSIX2_C_VERSION                    = 200809
   727  	X_POSIX2_LOCALEDEF                    = 200809
   728  	X_POSIX2_SW_DEV                       = 200809
   729  	X_POSIX2_VERSION                      = 200809
   730  	X_POSIX_ADVISORY_INFO                 = 200809
   731  	X_POSIX_ASYNCHRONOUS_IO               = 200809
   732  	X_POSIX_ASYNC_IO                      = 1
   733  	X_POSIX_BARRIERS                      = 200809
   734  	X_POSIX_CHOWN_RESTRICTED              = 0
   735  	X_POSIX_CLOCK_SELECTION               = 200809
   736  	X_POSIX_CPUTIME                       = 0
   737  	X_POSIX_C_SOURCE                      = 200809
   738  	X_POSIX_FSYNC                         = 200809
   739  	X_POSIX_IPV6                          = 200809
   740  	X_POSIX_JOB_CONTROL                   = 1
   741  	X_POSIX_MAPPED_FILES                  = 200809
   742  	X_POSIX_MEMLOCK                       = 200809
   743  	X_POSIX_MEMLOCK_RANGE                 = 200809
   744  	X_POSIX_MEMORY_PROTECTION             = 200809
   745  	X_POSIX_MESSAGE_PASSING               = 200809
   746  	X_POSIX_MONOTONIC_CLOCK               = 0
   747  	X_POSIX_NO_TRUNC                      = 1
   748  	X_POSIX_PRIORITIZED_IO                = 200809
   749  	X_POSIX_PRIORITY_SCHEDULING           = 200809
   750  	X_POSIX_RAW_SOCKETS                   = 200809
   751  	X_POSIX_READER_WRITER_LOCKS           = 200809
   752  	X_POSIX_REALTIME_SIGNALS              = 200809
   753  	X_POSIX_REENTRANT_FUNCTIONS           = 1
   754  	X_POSIX_REGEXP                        = 1
   755  	X_POSIX_SAVED_IDS                     = 1
   756  	X_POSIX_SEMAPHORES                    = 200809
   757  	X_POSIX_SHARED_MEMORY_OBJECTS         = 200809
   758  	X_POSIX_SHELL                         = 1
   759  	X_POSIX_SOURCE                        = 1
   760  	X_POSIX_SPAWN                         = 200809
   761  	X_POSIX_SPIN_LOCKS                    = 200809
   762  	X_POSIX_SPORADIC_SERVER               = -1
   763  	X_POSIX_SYNCHRONIZED_IO               = 200809
   764  	X_POSIX_THREADS                       = 200809
   765  	X_POSIX_THREAD_ATTR_STACKADDR         = 200809
   766  	X_POSIX_THREAD_ATTR_STACKSIZE         = 200809
   767  	X_POSIX_THREAD_CPUTIME                = 0
   768  	X_POSIX_THREAD_PRIORITY_SCHEDULING    = 200809
   769  	X_POSIX_THREAD_PRIO_INHERIT           = 200809
   770  	X_POSIX_THREAD_PRIO_PROTECT           = 200809
   771  	X_POSIX_THREAD_PROCESS_SHARED         = 200809
   772  	X_POSIX_THREAD_ROBUST_PRIO_INHERIT    = 200809
   773  	X_POSIX_THREAD_ROBUST_PRIO_PROTECT    = -1
   774  	X_POSIX_THREAD_SAFE_FUNCTIONS         = 200809
   775  	X_POSIX_THREAD_SPORADIC_SERVER        = -1
   776  	X_POSIX_TIMEOUTS                      = 200809
   777  	X_POSIX_TIMERS                        = 200809
   778  	X_POSIX_TRACE                         = -1
   779  	X_POSIX_TRACE_EVENT_FILTER            = -1
   780  	X_POSIX_TRACE_INHERIT                 = -1
   781  	X_POSIX_TRACE_LOG                     = -1
   782  	X_POSIX_TYPED_MEMORY_OBJECTS          = -1
   783  	X_POSIX_V6_LP64_OFF64                 = 1
   784  	X_POSIX_V6_LPBIG_OFFBIG               = -1
   785  	X_POSIX_V7_LP64_OFF64                 = 1
   786  	X_POSIX_V7_LPBIG_OFFBIG               = -1
   787  	X_POSIX_VDISABLE                      = 0
   788  	X_POSIX_VERSION                       = 200809
   789  	X_SIZET_                              = 0
   790  	X_SIZE_T                              = 0
   791  	X_SIZE_T_                             = 0
   792  	X_SIZE_T_DECLARED                     = 0
   793  	X_SIZE_T_DEFINED                      = 0
   794  	X_SIZE_T_DEFINED_                     = 0
   795  	X_SQLITE3RTREE_H_                     = 0
   796  	X_STDARG_H                            = 0
   797  	X_STDC_PREDEF_H                       = 1
   798  	X_STDIO_H                             = 1
   799  	X_STDLIB_H                            = 1
   800  	X_STRINGS_H                           = 1
   801  	X_STRING_H                            = 1
   802  	X_STRUCT_TIMESPEC                     = 1
   803  	X_SYS_CDEFS_H                         = 1
   804  	X_SYS_SELECT_H                        = 1
   805  	X_SYS_SIZE_T_H                        = 0
   806  	X_SYS_TYPES_H                         = 1
   807  	X_THREAD_SHARED_TYPES_H               = 1
   808  	X_T_SIZE                              = 0
   809  	X_T_SIZE_                             = 0
   810  	X_T_WCHAR                             = 0
   811  	X_T_WCHAR_                            = 0
   812  	X_UNISTD_H                            = 1
   813  	X_VA_LIST                             = 0
   814  	X_VA_LIST_                            = 0
   815  	X_VA_LIST_DEFINED                     = 0
   816  	X_VA_LIST_T_H                         = 0
   817  	X_WCHAR_T                             = 0
   818  	X_WCHAR_T_                            = 0
   819  	X_WCHAR_T_DECLARED                    = 0
   820  	X_WCHAR_T_DEFINED                     = 0
   821  	X_WCHAR_T_DEFINED_                    = 0
   822  	X_WCHAR_T_H                           = 0
   823  	X_XBS5_LP64_OFF64                     = 1
   824  	X_XBS5_LPBIG_OFFBIG                   = -1
   825  	X_XOPEN_ENH_I18N                      = 1
   826  	X_XOPEN_LEGACY                        = 1
   827  	X_XOPEN_REALTIME                      = 1
   828  	X_XOPEN_REALTIME_THREADS              = 1
   829  	X_XOPEN_SHM                           = 1
   830  	X_XOPEN_UNIX                          = 1
   831  	X_XOPEN_VERSION                       = 700
   832  	X_XOPEN_XCU_VERSION                   = 4
   833  	X_XOPEN_XPG2                          = 1
   834  	X_XOPEN_XPG3                          = 1
   835  	X_XOPEN_XPG4                          = 1
   836  	Linux                                 = 1
   837  	Unix                                  = 1
   838  )
   839  
   840  // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
   841  //    the `_SC_*' symbols for the NAME argument to `sysconf';
   842  //    and the `_CS_*' symbols for the NAME argument to `confstr'.
   843  // `sysconf', `pathconf', and `confstr' NAME values.  Generic version.
   844  //    Copyright (C) 1993-2018 Free Software Foundation, Inc.
   845  //    This file is part of the GNU C Library.
   846  //
   847  //    The GNU C Library is free software; you can redistribute it and/or
   848  //    modify it under the terms of the GNU Lesser General Public
   849  //    License as published by the Free Software Foundation; either
   850  //    version 2.1 of the License, or (at your option) any later version.
   851  //
   852  //    The GNU C Library is distributed in the hope that it will be useful,
   853  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   854  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   855  //    Lesser General Public License for more details.
   856  //
   857  //    You should have received a copy of the GNU Lesser General Public
   858  //    License along with the GNU C Library; if not, see
   859  //    <http://www.gnu.org/licenses/>.
   860  
   861  // Values for the NAME argument to `pathconf' and `fpathconf'.
   862  const ( /* confname.h:24:1: */
   863  	_PC_LINK_MAX           = 0
   864  	_PC_MAX_CANON          = 1
   865  	_PC_MAX_INPUT          = 2
   866  	_PC_NAME_MAX           = 3
   867  	_PC_PATH_MAX           = 4
   868  	_PC_PIPE_BUF           = 5
   869  	_PC_CHOWN_RESTRICTED   = 6
   870  	_PC_NO_TRUNC           = 7
   871  	_PC_VDISABLE           = 8
   872  	_PC_SYNC_IO            = 9
   873  	_PC_ASYNC_IO           = 10
   874  	_PC_PRIO_IO            = 11
   875  	_PC_SOCK_MAXBUF        = 12
   876  	_PC_FILESIZEBITS       = 13
   877  	_PC_REC_INCR_XFER_SIZE = 14
   878  	_PC_REC_MAX_XFER_SIZE  = 15
   879  	_PC_REC_MIN_XFER_SIZE  = 16
   880  	_PC_REC_XFER_ALIGN     = 17
   881  	_PC_ALLOC_SIZE_MIN     = 18
   882  	_PC_SYMLINK_MAX        = 19
   883  	_PC_2_SYMLINKS         = 20
   884  )
   885  
   886  // Values for the NAME argument to `confstr'.
   887  const ( /* confname.h:533:1: */
   888  	_CS_PATH = 0 // The default search path.
   889  
   890  	_CS_V6_WIDTH_RESTRICTED_ENVS = 1
   891  
   892  	_CS_GNU_LIBC_VERSION       = 2
   893  	_CS_GNU_LIBPTHREAD_VERSION = 3
   894  
   895  	_CS_V5_WIDTH_RESTRICTED_ENVS = 4
   896  
   897  	_CS_V7_WIDTH_RESTRICTED_ENVS = 5
   898  
   899  	_CS_LFS_CFLAGS      = 1000
   900  	_CS_LFS_LDFLAGS     = 1001
   901  	_CS_LFS_LIBS        = 1002
   902  	_CS_LFS_LINTFLAGS   = 1003
   903  	_CS_LFS64_CFLAGS    = 1004
   904  	_CS_LFS64_LDFLAGS   = 1005
   905  	_CS_LFS64_LIBS      = 1006
   906  	_CS_LFS64_LINTFLAGS = 1007
   907  
   908  	_CS_XBS5_ILP32_OFF32_CFLAGS     = 1100
   909  	_CS_XBS5_ILP32_OFF32_LDFLAGS    = 1101
   910  	_CS_XBS5_ILP32_OFF32_LIBS       = 1102
   911  	_CS_XBS5_ILP32_OFF32_LINTFLAGS  = 1103
   912  	_CS_XBS5_ILP32_OFFBIG_CFLAGS    = 1104
   913  	_CS_XBS5_ILP32_OFFBIG_LDFLAGS   = 1105
   914  	_CS_XBS5_ILP32_OFFBIG_LIBS      = 1106
   915  	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107
   916  	_CS_XBS5_LP64_OFF64_CFLAGS      = 1108
   917  	_CS_XBS5_LP64_OFF64_LDFLAGS     = 1109
   918  	_CS_XBS5_LP64_OFF64_LIBS        = 1110
   919  	_CS_XBS5_LP64_OFF64_LINTFLAGS   = 1111
   920  	_CS_XBS5_LPBIG_OFFBIG_CFLAGS    = 1112
   921  	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS   = 1113
   922  	_CS_XBS5_LPBIG_OFFBIG_LIBS      = 1114
   923  	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115
   924  
   925  	_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 1116
   926  	_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 1117
   927  	_CS_POSIX_V6_ILP32_OFF32_LIBS       = 1118
   928  	_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS  = 1119
   929  	_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 1120
   930  	_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 1121
   931  	_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 1122
   932  	_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
   933  	_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 1124
   934  	_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 1125
   935  	_CS_POSIX_V6_LP64_OFF64_LIBS        = 1126
   936  	_CS_POSIX_V6_LP64_OFF64_LINTFLAGS   = 1127
   937  	_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 1128
   938  	_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 1129
   939  	_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 1130
   940  	_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
   941  
   942  	_CS_POSIX_V7_ILP32_OFF32_CFLAGS     = 1132
   943  	_CS_POSIX_V7_ILP32_OFF32_LDFLAGS    = 1133
   944  	_CS_POSIX_V7_ILP32_OFF32_LIBS       = 1134
   945  	_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS  = 1135
   946  	_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS    = 1136
   947  	_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS   = 1137
   948  	_CS_POSIX_V7_ILP32_OFFBIG_LIBS      = 1138
   949  	_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
   950  	_CS_POSIX_V7_LP64_OFF64_CFLAGS      = 1140
   951  	_CS_POSIX_V7_LP64_OFF64_LDFLAGS     = 1141
   952  	_CS_POSIX_V7_LP64_OFF64_LIBS        = 1142
   953  	_CS_POSIX_V7_LP64_OFF64_LINTFLAGS   = 1143
   954  	_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS    = 1144
   955  	_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS   = 1145
   956  	_CS_POSIX_V7_LPBIG_OFFBIG_LIBS      = 1146
   957  	_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
   958  
   959  	_CS_V6_ENV = 1148
   960  	_CS_V7_ENV = 1149
   961  )
   962  
   963  // Values for the argument to `sysconf'.
   964  const ( /* confname.h:71:1: */
   965  	_SC_ARG_MAX               = 0
   966  	_SC_CHILD_MAX             = 1
   967  	_SC_CLK_TCK               = 2
   968  	_SC_NGROUPS_MAX           = 3
   969  	_SC_OPEN_MAX              = 4
   970  	_SC_STREAM_MAX            = 5
   971  	_SC_TZNAME_MAX            = 6
   972  	_SC_JOB_CONTROL           = 7
   973  	_SC_SAVED_IDS             = 8
   974  	_SC_REALTIME_SIGNALS      = 9
   975  	_SC_PRIORITY_SCHEDULING   = 10
   976  	_SC_TIMERS                = 11
   977  	_SC_ASYNCHRONOUS_IO       = 12
   978  	_SC_PRIORITIZED_IO        = 13
   979  	_SC_SYNCHRONIZED_IO       = 14
   980  	_SC_FSYNC                 = 15
   981  	_SC_MAPPED_FILES          = 16
   982  	_SC_MEMLOCK               = 17
   983  	_SC_MEMLOCK_RANGE         = 18
   984  	_SC_MEMORY_PROTECTION     = 19
   985  	_SC_MESSAGE_PASSING       = 20
   986  	_SC_SEMAPHORES            = 21
   987  	_SC_SHARED_MEMORY_OBJECTS = 22
   988  	_SC_AIO_LISTIO_MAX        = 23
   989  	_SC_AIO_MAX               = 24
   990  	_SC_AIO_PRIO_DELTA_MAX    = 25
   991  	_SC_DELAYTIMER_MAX        = 26
   992  	_SC_MQ_OPEN_MAX           = 27
   993  	_SC_MQ_PRIO_MAX           = 28
   994  	_SC_VERSION               = 29
   995  	_SC_PAGESIZE              = 30
   996  	_SC_RTSIG_MAX             = 31
   997  	_SC_SEM_NSEMS_MAX         = 32
   998  	_SC_SEM_VALUE_MAX         = 33
   999  	_SC_SIGQUEUE_MAX          = 34
  1000  	_SC_TIMER_MAX             = 35
  1001  
  1002  	// Values for the argument to `sysconf'
  1003  	//        corresponding to _POSIX2_* symbols.
  1004  	_SC_BC_BASE_MAX        = 36
  1005  	_SC_BC_DIM_MAX         = 37
  1006  	_SC_BC_SCALE_MAX       = 38
  1007  	_SC_BC_STRING_MAX      = 39
  1008  	_SC_COLL_WEIGHTS_MAX   = 40
  1009  	_SC_EQUIV_CLASS_MAX    = 41
  1010  	_SC_EXPR_NEST_MAX      = 42
  1011  	_SC_LINE_MAX           = 43
  1012  	_SC_RE_DUP_MAX         = 44
  1013  	_SC_CHARCLASS_NAME_MAX = 45
  1014  
  1015  	_SC_2_VERSION   = 46
  1016  	_SC_2_C_BIND    = 47
  1017  	_SC_2_C_DEV     = 48
  1018  	_SC_2_FORT_DEV  = 49
  1019  	_SC_2_FORT_RUN  = 50
  1020  	_SC_2_SW_DEV    = 51
  1021  	_SC_2_LOCALEDEF = 52
  1022  
  1023  	_SC_PII                 = 53
  1024  	_SC_PII_XTI             = 54
  1025  	_SC_PII_SOCKET          = 55
  1026  	_SC_PII_INTERNET        = 56
  1027  	_SC_PII_OSI             = 57
  1028  	_SC_POLL                = 58
  1029  	_SC_SELECT              = 59
  1030  	_SC_UIO_MAXIOV          = 60
  1031  	_SC_IOV_MAX             = 60
  1032  	_SC_PII_INTERNET_STREAM = 61
  1033  	_SC_PII_INTERNET_DGRAM  = 62
  1034  	_SC_PII_OSI_COTS        = 63
  1035  	_SC_PII_OSI_CLTS        = 64
  1036  	_SC_PII_OSI_M           = 65
  1037  	_SC_T_IOV_MAX           = 66
  1038  
  1039  	// Values according to POSIX 1003.1c (POSIX threads).
  1040  	_SC_THREADS                      = 67
  1041  	_SC_THREAD_SAFE_FUNCTIONS        = 68
  1042  	_SC_GETGR_R_SIZE_MAX             = 69
  1043  	_SC_GETPW_R_SIZE_MAX             = 70
  1044  	_SC_LOGIN_NAME_MAX               = 71
  1045  	_SC_TTY_NAME_MAX                 = 72
  1046  	_SC_THREAD_DESTRUCTOR_ITERATIONS = 73
  1047  	_SC_THREAD_KEYS_MAX              = 74
  1048  	_SC_THREAD_STACK_MIN             = 75
  1049  	_SC_THREAD_THREADS_MAX           = 76
  1050  	_SC_THREAD_ATTR_STACKADDR        = 77
  1051  	_SC_THREAD_ATTR_STACKSIZE        = 78
  1052  	_SC_THREAD_PRIORITY_SCHEDULING   = 79
  1053  	_SC_THREAD_PRIO_INHERIT          = 80
  1054  	_SC_THREAD_PRIO_PROTECT          = 81
  1055  	_SC_THREAD_PROCESS_SHARED        = 82
  1056  
  1057  	_SC_NPROCESSORS_CONF = 83
  1058  	_SC_NPROCESSORS_ONLN = 84
  1059  	_SC_PHYS_PAGES       = 85
  1060  	_SC_AVPHYS_PAGES     = 86
  1061  	_SC_ATEXIT_MAX       = 87
  1062  	_SC_PASS_MAX         = 88
  1063  
  1064  	_SC_XOPEN_VERSION     = 89
  1065  	_SC_XOPEN_XCU_VERSION = 90
  1066  	_SC_XOPEN_UNIX        = 91
  1067  	_SC_XOPEN_CRYPT       = 92
  1068  	_SC_XOPEN_ENH_I18N    = 93
  1069  	_SC_XOPEN_SHM         = 94
  1070  
  1071  	_SC_2_CHAR_TERM = 95
  1072  	_SC_2_C_VERSION = 96
  1073  	_SC_2_UPE       = 97
  1074  
  1075  	_SC_XOPEN_XPG2 = 98
  1076  	_SC_XOPEN_XPG3 = 99
  1077  	_SC_XOPEN_XPG4 = 100
  1078  
  1079  	_SC_CHAR_BIT   = 101
  1080  	_SC_CHAR_MAX   = 102
  1081  	_SC_CHAR_MIN   = 103
  1082  	_SC_INT_MAX    = 104
  1083  	_SC_INT_MIN    = 105
  1084  	_SC_LONG_BIT   = 106
  1085  	_SC_WORD_BIT   = 107
  1086  	_SC_MB_LEN_MAX = 108
  1087  	_SC_NZERO      = 109
  1088  	_SC_SSIZE_MAX  = 110
  1089  	_SC_SCHAR_MAX  = 111
  1090  	_SC_SCHAR_MIN  = 112
  1091  	_SC_SHRT_MAX   = 113
  1092  	_SC_SHRT_MIN   = 114
  1093  	_SC_UCHAR_MAX  = 115
  1094  	_SC_UINT_MAX   = 116
  1095  	_SC_ULONG_MAX  = 117
  1096  	_SC_USHRT_MAX  = 118
  1097  
  1098  	_SC_NL_ARGMAX  = 119
  1099  	_SC_NL_LANGMAX = 120
  1100  	_SC_NL_MSGMAX  = 121
  1101  	_SC_NL_NMAX    = 122
  1102  	_SC_NL_SETMAX  = 123
  1103  	_SC_NL_TEXTMAX = 124
  1104  
  1105  	_SC_XBS5_ILP32_OFF32  = 125
  1106  	_SC_XBS5_ILP32_OFFBIG = 126
  1107  	_SC_XBS5_LP64_OFF64   = 127
  1108  	_SC_XBS5_LPBIG_OFFBIG = 128
  1109  
  1110  	_SC_XOPEN_LEGACY           = 129
  1111  	_SC_XOPEN_REALTIME         = 130
  1112  	_SC_XOPEN_REALTIME_THREADS = 131
  1113  
  1114  	_SC_ADVISORY_INFO          = 132
  1115  	_SC_BARRIERS               = 133
  1116  	_SC_BASE                   = 134
  1117  	_SC_C_LANG_SUPPORT         = 135
  1118  	_SC_C_LANG_SUPPORT_R       = 136
  1119  	_SC_CLOCK_SELECTION        = 137
  1120  	_SC_CPUTIME                = 138
  1121  	_SC_THREAD_CPUTIME         = 139
  1122  	_SC_DEVICE_IO              = 140
  1123  	_SC_DEVICE_SPECIFIC        = 141
  1124  	_SC_DEVICE_SPECIFIC_R      = 142
  1125  	_SC_FD_MGMT                = 143
  1126  	_SC_FIFO                   = 144
  1127  	_SC_PIPE                   = 145
  1128  	_SC_FILE_ATTRIBUTES        = 146
  1129  	_SC_FILE_LOCKING           = 147
  1130  	_SC_FILE_SYSTEM            = 148
  1131  	_SC_MONOTONIC_CLOCK        = 149
  1132  	_SC_MULTI_PROCESS          = 150
  1133  	_SC_SINGLE_PROCESS         = 151
  1134  	_SC_NETWORKING             = 152
  1135  	_SC_READER_WRITER_LOCKS    = 153
  1136  	_SC_SPIN_LOCKS             = 154
  1137  	_SC_REGEXP                 = 155
  1138  	_SC_REGEX_VERSION          = 156
  1139  	_SC_SHELL                  = 157
  1140  	_SC_SIGNALS                = 158
  1141  	_SC_SPAWN                  = 159
  1142  	_SC_SPORADIC_SERVER        = 160
  1143  	_SC_THREAD_SPORADIC_SERVER = 161
  1144  	_SC_SYSTEM_DATABASE        = 162
  1145  	_SC_SYSTEM_DATABASE_R      = 163
  1146  	_SC_TIMEOUTS               = 164
  1147  	_SC_TYPED_MEMORY_OBJECTS   = 165
  1148  	_SC_USER_GROUPS            = 166
  1149  	_SC_USER_GROUPS_R          = 167
  1150  	_SC_2_PBS                  = 168
  1151  	_SC_2_PBS_ACCOUNTING       = 169
  1152  	_SC_2_PBS_LOCATE           = 170
  1153  	_SC_2_PBS_MESSAGE          = 171
  1154  	_SC_2_PBS_TRACK            = 172
  1155  	_SC_SYMLOOP_MAX            = 173
  1156  	_SC_STREAMS                = 174
  1157  	_SC_2_PBS_CHECKPOINT       = 175
  1158  
  1159  	_SC_V6_ILP32_OFF32  = 176
  1160  	_SC_V6_ILP32_OFFBIG = 177
  1161  	_SC_V6_LP64_OFF64   = 178
  1162  	_SC_V6_LPBIG_OFFBIG = 179
  1163  
  1164  	_SC_HOST_NAME_MAX      = 180
  1165  	_SC_TRACE              = 181
  1166  	_SC_TRACE_EVENT_FILTER = 182
  1167  	_SC_TRACE_INHERIT      = 183
  1168  	_SC_TRACE_LOG          = 184
  1169  
  1170  	_SC_LEVEL1_ICACHE_SIZE     = 185
  1171  	_SC_LEVEL1_ICACHE_ASSOC    = 186
  1172  	_SC_LEVEL1_ICACHE_LINESIZE = 187
  1173  	_SC_LEVEL1_DCACHE_SIZE     = 188
  1174  	_SC_LEVEL1_DCACHE_ASSOC    = 189
  1175  	_SC_LEVEL1_DCACHE_LINESIZE = 190
  1176  	_SC_LEVEL2_CACHE_SIZE      = 191
  1177  	_SC_LEVEL2_CACHE_ASSOC     = 192
  1178  	_SC_LEVEL2_CACHE_LINESIZE  = 193
  1179  	_SC_LEVEL3_CACHE_SIZE      = 194
  1180  	_SC_LEVEL3_CACHE_ASSOC     = 195
  1181  	_SC_LEVEL3_CACHE_LINESIZE  = 196
  1182  	_SC_LEVEL4_CACHE_SIZE      = 197
  1183  	_SC_LEVEL4_CACHE_ASSOC     = 198
  1184  	_SC_LEVEL4_CACHE_LINESIZE  = 199
  1185  	// Leave room here, maybe we need a few more cache levels some day.
  1186  
  1187  	_SC_IPV6        = 235
  1188  	_SC_RAW_SOCKETS = 236
  1189  
  1190  	_SC_V7_ILP32_OFF32  = 237
  1191  	_SC_V7_ILP32_OFFBIG = 238
  1192  	_SC_V7_LP64_OFF64   = 239
  1193  	_SC_V7_LPBIG_OFFBIG = 240
  1194  
  1195  	_SC_SS_REPL_MAX = 241
  1196  
  1197  	_SC_TRACE_EVENT_NAME_MAX = 242
  1198  	_SC_TRACE_NAME_MAX       = 243
  1199  	_SC_TRACE_SYS_MAX        = 244
  1200  	_SC_TRACE_USER_EVENT_MAX = 245
  1201  
  1202  	_SC_XOPEN_STREAMS = 246
  1203  
  1204  	_SC_THREAD_ROBUST_PRIO_INHERIT = 247
  1205  	_SC_THREAD_ROBUST_PRIO_PROTECT = 248
  1206  )
  1207  
  1208  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  1209  //     are already defined.
  1210  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  1211  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  1212  
  1213  // A null pointer constant.
  1214  
  1215  // XPG requires a few symbols from <sys/wait.h> being defined.
  1216  // Definitions of flag bits for `waitpid' et al.
  1217  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  1218  //    This file is part of the GNU C Library.
  1219  //
  1220  //    The GNU C Library is free software; you can redistribute it and/or
  1221  //    modify it under the terms of the GNU Lesser General Public
  1222  //    License as published by the Free Software Foundation; either
  1223  //    version 2.1 of the License, or (at your option) any later version.
  1224  //
  1225  //    The GNU C Library is distributed in the hope that it will be useful,
  1226  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1227  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1228  //    Lesser General Public License for more details.
  1229  //
  1230  //    You should have received a copy of the GNU Lesser General Public
  1231  //    License along with the GNU C Library; if not, see
  1232  //    <http://www.gnu.org/licenses/>.
  1233  
  1234  // Bits in the third argument to `waitpid'.
  1235  
  1236  // Bits in the fourth argument to `waitid'.
  1237  
  1238  // The following values are used by the `waitid' function.
  1239  
  1240  // The Linux kernel defines these bare, rather than an enum,
  1241  //    which causes a conflict if the include order is reversed.
  1242  
  1243  const ( /* waitflags.h:52:1: */
  1244  	P_ALL  = 0 // Wait for any child.
  1245  	P_PID  = 1 // Wait for specified process.
  1246  	P_PGID = 2
  1247  )
  1248  
  1249  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1250  //    This file is part of the GNU C Library.
  1251  //
  1252  //    The GNU C Library is free software; you can redistribute it and/or
  1253  //    modify it under the terms of the GNU Lesser General Public
  1254  //    License as published by the Free Software Foundation; either
  1255  //    version 2.1 of the License, or (at your option) any later version.
  1256  //
  1257  //    The GNU C Library is distributed in the hope that it will be useful,
  1258  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1259  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1260  //    Lesser General Public License for more details.
  1261  //
  1262  //    You should have received a copy of the GNU Lesser General Public
  1263  //    License along with the GNU C Library; if not, see
  1264  //    <http://www.gnu.org/licenses/>.
  1265  
  1266  //	ISO C99 Standard: 7.2 Diagnostics	<assert.h>
  1267  
  1268  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1269  //    This file is part of the GNU C Library.
  1270  //
  1271  //    The GNU C Library is free software; you can redistribute it and/or
  1272  //    modify it under the terms of the GNU Lesser General Public
  1273  //    License as published by the Free Software Foundation; either
  1274  //    version 2.1 of the License, or (at your option) any later version.
  1275  //
  1276  //    The GNU C Library is distributed in the hope that it will be useful,
  1277  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1278  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1279  //    Lesser General Public License for more details.
  1280  //
  1281  //    You should have received a copy of the GNU Lesser General Public
  1282  //    License along with the GNU C Library; if not, see
  1283  //    <http://www.gnu.org/licenses/>.
  1284  
  1285  // void assert (int expression);
  1286  //
  1287  //    If NDEBUG is defined, do nothing.
  1288  //    If not, and EXPRESSION is zero, print an error message and abort.
  1289  
  1290  // void assert_perror (int errnum);
  1291  //
  1292  //    If NDEBUG is defined, do nothing.  If not, and ERRNUM is not zero, print an
  1293  //    error message with the error text for ERRNUM and abort.
  1294  //    (This is a GNU extension.)
  1295  
  1296  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1297  //    This file is part of the GNU C Library.
  1298  //
  1299  //    The GNU C Library is free software; you can redistribute it and/or
  1300  //    modify it under the terms of the GNU Lesser General Public
  1301  //    License as published by the Free Software Foundation; either
  1302  //    version 2.1 of the License, or (at your option) any later version.
  1303  //
  1304  //    The GNU C Library is distributed in the hope that it will be useful,
  1305  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1306  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1307  //    Lesser General Public License for more details.
  1308  //
  1309  //    You should have received a copy of the GNU Lesser General Public
  1310  //    License along with the GNU C Library; if not, see
  1311  //    <http://www.gnu.org/licenses/>.
  1312  
  1313  //	ISO C99 Standard 7.4: Character handling	<ctype.h>
  1314  
  1315  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1316  //    This file is part of the GNU C Library.
  1317  //
  1318  //    The GNU C Library is free software; you can redistribute it and/or
  1319  //    modify it under the terms of the GNU Lesser General Public
  1320  //    License as published by the Free Software Foundation; either
  1321  //    version 2.1 of the License, or (at your option) any later version.
  1322  //
  1323  //    The GNU C Library is distributed in the hope that it will be useful,
  1324  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1325  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1326  //    Lesser General Public License for more details.
  1327  //
  1328  //    You should have received a copy of the GNU Lesser General Public
  1329  //    License along with the GNU C Library; if not, see
  1330  //    <http://www.gnu.org/licenses/>.
  1331  
  1332  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1333  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  1334  //    This file is part of the GNU C Library.
  1335  //
  1336  //    The GNU C Library is free software; you can redistribute it and/or
  1337  //    modify it under the terms of the GNU Lesser General Public
  1338  //    License as published by the Free Software Foundation; either
  1339  //    version 2.1 of the License, or (at your option) any later version.
  1340  //
  1341  //    The GNU C Library is distributed in the hope that it will be useful,
  1342  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1343  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1344  //    Lesser General Public License for more details.
  1345  //
  1346  //    You should have received a copy of the GNU Lesser General Public
  1347  //    License along with the GNU C Library; if not, see
  1348  //    <http://www.gnu.org/licenses/>.
  1349  
  1350  // Never include this file directly; use <sys/types.h> instead.
  1351  
  1352  // These are all the characteristics of characters.
  1353  //    If there get to be more than 16 distinct characteristics,
  1354  //    many things must be changed that use `unsigned short int's.
  1355  //
  1356  //    The characteristics are stored always in network byte order (big
  1357  //    endian).  We define the bit value interpretations here dependent on the
  1358  //    machine's byte order.
  1359  
  1360  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  1361  //    This file is part of the GNU C Library.
  1362  //
  1363  //    The GNU C Library is free software; you can redistribute it and/or
  1364  //    modify it under the terms of the GNU Lesser General Public
  1365  //    License as published by the Free Software Foundation; either
  1366  //    version 2.1 of the License, or (at your option) any later version.
  1367  //
  1368  //    The GNU C Library is distributed in the hope that it will be useful,
  1369  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1370  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1371  //    Lesser General Public License for more details.
  1372  //
  1373  //    You should have received a copy of the GNU Lesser General Public
  1374  //    License along with the GNU C Library; if not, see
  1375  //    <http://www.gnu.org/licenses/>.
  1376  
  1377  const ( /* ctype.h:46:1: */
  1378  	_ISupper  = 1    // UPPERCASE.
  1379  	_ISlower  = 2    // lowercase.
  1380  	_ISalpha  = 4    // Alphabetic.
  1381  	_ISdigit  = 8    // Numeric.
  1382  	_ISxdigit = 16   // Hexadecimal numeric.
  1383  	_ISspace  = 32   // Whitespace.
  1384  	_ISprint  = 64   // Printing.
  1385  	_ISgraph  = 128  // Graphical.
  1386  	_ISblank  = 256  // Blank (usually SPC and TAB).
  1387  	_IScntrl  = 512  // Control character.
  1388  	_ISpunct  = 1024 // Punctuation.
  1389  	_ISalnum  = 2048
  1390  )
  1391  
  1392  type ptrdiff_t = int64 /* <builtin>:3:26 */
  1393  
  1394  type size_t = uint64 /* <builtin>:9:23 */
  1395  
  1396  type wchar_t = int32 /* <builtin>:15:24 */
  1397  
  1398  // Define the standard macros for the user,
  1399  //    if this invocation was from the user program.
  1400  
  1401  // Define va_list, if desired, from __gnuc_va_list.
  1402  // We deliberately do not define va_list when called from
  1403  //    stdio.h, because ANSI C says that stdio.h is not supposed to define
  1404  //    va_list.  stdio.h needs to have access to that data type,
  1405  //    but must not use that name.  It should use the name __gnuc_va_list,
  1406  //    which is safe because it is reserved for the implementation.
  1407  
  1408  // The macro _VA_LIST_ is the same thing used by this file in Ultrix.
  1409  //    But on BSD NET2 we must not test or define or undef it.
  1410  //    (Note that the comments in NET 2's ansi.h
  1411  //    are incorrect for _VA_LIST_--see stdio.h!)
  1412  // The macro _VA_LIST_DEFINED is used in Windows NT 3.5
  1413  // The macro _VA_LIST is used in SCO Unix 3.2.
  1414  // The macro _VA_LIST_T_H is used in the Bull dpx2
  1415  // The macro __va_list__ is used by BeOS.
  1416  type va_list = uintptr /* stdarg.h:99:24 */
  1417  
  1418  // CAPI3REF: 64-Bit Integer Types
  1419  // KEYWORDS: sqlite_int64 sqlite_uint64
  1420  //
  1421  // Because there is no cross-platform way to specify 64-bit integer types
  1422  // SQLite includes typedefs for 64-bit signed and unsigned integers.
  1423  //
  1424  // The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
  1425  // The sqlite_int64 and sqlite_uint64 types are supported for backwards
  1426  // compatibility only.
  1427  //
  1428  // ^The sqlite3_int64 and sqlite_int64 types can store integer values
  1429  // between -9223372036854775808 and +9223372036854775807 inclusive.  ^The
  1430  // sqlite3_uint64 and sqlite_uint64 types can store integer values
  1431  // between 0 and +18446744073709551615 inclusive.
  1432  type sqlite_int64 = int64           /* sqlite3.h:278:25 */
  1433  type sqlite_uint64 = uint64         /* sqlite3.h:279:34 */
  1434  type sqlite3_int64 = sqlite_int64   /* sqlite3.h:281:22 */
  1435  type sqlite3_uint64 = sqlite_uint64 /* sqlite3.h:282:23 */
  1436  
  1437  // The type for a callback function.
  1438  // This is legacy and deprecated.  It is included for historical
  1439  // compatibility and is not documented.
  1440  type sqlite3_callback = uintptr /* sqlite3.h:338:13 */
  1441  
  1442  // CAPI3REF: Result Codes
  1443  // KEYWORDS: {result code definitions}
  1444  //
  1445  // Many SQLite functions return an integer result code from the set shown
  1446  // here in order to indicate success or failure.
  1447  //
  1448  // New error codes may be added in future versions of SQLite.
  1449  //
  1450  // See also: [extended result code definitions]
  1451  // beginning-of-error-codes
  1452  // end-of-error-codes
  1453  
  1454  // CAPI3REF: Extended Result Codes
  1455  // KEYWORDS: {extended result code definitions}
  1456  //
  1457  // In its default configuration, SQLite API routines return one of 30 integer
  1458  // [result codes].  However, experience has shown that many of
  1459  // these result codes are too coarse-grained.  They do not provide as
  1460  // much information about problems as programmers might like.  In an effort to
  1461  // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]
  1462  // and later) include
  1463  // support for additional result codes that provide more detailed information
  1464  // about errors. These [extended result codes] are enabled or disabled
  1465  // on a per database connection basis using the
  1466  // [sqlite3_extended_result_codes()] API.  Or, the extended code for
  1467  // the most recent error can be obtained using
  1468  // [sqlite3_extended_errcode()].
  1469  
  1470  // CAPI3REF: Flags For File Open Operations
  1471  //
  1472  // These bit values are intended for use in the
  1473  // 3rd parameter to the [sqlite3_open_v2()] interface and
  1474  // in the 4th parameter to the [sqlite3_vfs.xOpen] method.
  1475  
  1476  // Reserved:                         0x00F00000
  1477  // Legacy compatibility:
  1478  
  1479  // CAPI3REF: Device Characteristics
  1480  //
  1481  // The xDeviceCharacteristics method of the [sqlite3_io_methods]
  1482  // object returns an integer which is a vector of these
  1483  // bit values expressing I/O characteristics of the mass storage
  1484  // device that holds the file that the [sqlite3_io_methods]
  1485  // refers to.
  1486  //
  1487  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  1488  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  1489  // mean that writes of blocks that are nnn bytes in size and
  1490  // are aligned to an address which is an integer multiple of
  1491  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  1492  // that when data is appended to a file, the data is appended
  1493  // first then the size of the file is extended, never the other
  1494  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  1495  // information is written to disk in the same order as calls
  1496  // to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that
  1497  // after reboot following a crash or power loss, the only bytes in a
  1498  // file that were written at the application level might have changed
  1499  // and that adjacent bytes, even bytes within the same sector are
  1500  // guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
  1501  // flag indicates that a file cannot be deleted when open.  The
  1502  // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
  1503  // read-only media and cannot be changed even by processes with
  1504  // elevated privileges.
  1505  //
  1506  // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
  1507  // filesystem supports doing multiple write operations atomically when those
  1508  // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
  1509  // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
  1510  
  1511  // CAPI3REF: File Locking Levels
  1512  //
  1513  // SQLite uses one of these integer values as the second
  1514  // argument to calls it makes to the xLock() and xUnlock() methods
  1515  // of an [sqlite3_io_methods] object.
  1516  
  1517  // CAPI3REF: Synchronization Type Flags
  1518  //
  1519  // When SQLite invokes the xSync() method of an
  1520  // [sqlite3_io_methods] object it uses a combination of
  1521  // these integer values as the second argument.
  1522  //
  1523  // When the SQLITE_SYNC_DATAONLY flag is used, it means that the
  1524  // sync operation only needs to flush data to mass storage.  Inode
  1525  // information need not be flushed. If the lower four bits of the flag
  1526  // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
  1527  // If the lower four bits equal SQLITE_SYNC_FULL, that means
  1528  // to use Mac OS X style fullsync instead of fsync().
  1529  //
  1530  // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
  1531  // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
  1532  // settings.  The [synchronous pragma] determines when calls to the
  1533  // xSync VFS method occur and applies uniformly across all platforms.
  1534  // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
  1535  // energetic or rigorous or forceful the sync operations are and
  1536  // only make a difference on Mac OSX for the default SQLite code.
  1537  // (Third-party VFS implementations might also make the distinction
  1538  // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
  1539  // operating systems natively supported by SQLite, only Mac OSX
  1540  // cares about the difference.)
  1541  
  1542  // CAPI3REF: OS Interface Open File Handle
  1543  //
  1544  // An [sqlite3_file] object represents an open file in the
  1545  // [sqlite3_vfs | OS interface layer].  Individual OS interface
  1546  // implementations will
  1547  // want to subclass this object by appending additional fields
  1548  // for their own use.  The pMethods entry is a pointer to an
  1549  // [sqlite3_io_methods] object that defines methods for performing
  1550  // I/O operations on the open file.
  1551  type sqlite3_file1 = struct{ pMethods uintptr } /* sqlite3.h:684:9 */
  1552  
  1553  // CAPI3REF: Result Codes
  1554  // KEYWORDS: {result code definitions}
  1555  //
  1556  // Many SQLite functions return an integer result code from the set shown
  1557  // here in order to indicate success or failure.
  1558  //
  1559  // New error codes may be added in future versions of SQLite.
  1560  //
  1561  // See also: [extended result code definitions]
  1562  // beginning-of-error-codes
  1563  // end-of-error-codes
  1564  
  1565  // CAPI3REF: Extended Result Codes
  1566  // KEYWORDS: {extended result code definitions}
  1567  //
  1568  // In its default configuration, SQLite API routines return one of 30 integer
  1569  // [result codes].  However, experience has shown that many of
  1570  // these result codes are too coarse-grained.  They do not provide as
  1571  // much information about problems as programmers might like.  In an effort to
  1572  // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]
  1573  // and later) include
  1574  // support for additional result codes that provide more detailed information
  1575  // about errors. These [extended result codes] are enabled or disabled
  1576  // on a per database connection basis using the
  1577  // [sqlite3_extended_result_codes()] API.  Or, the extended code for
  1578  // the most recent error can be obtained using
  1579  // [sqlite3_extended_errcode()].
  1580  
  1581  // CAPI3REF: Flags For File Open Operations
  1582  //
  1583  // These bit values are intended for use in the
  1584  // 3rd parameter to the [sqlite3_open_v2()] interface and
  1585  // in the 4th parameter to the [sqlite3_vfs.xOpen] method.
  1586  
  1587  // Reserved:                         0x00F00000
  1588  // Legacy compatibility:
  1589  
  1590  // CAPI3REF: Device Characteristics
  1591  //
  1592  // The xDeviceCharacteristics method of the [sqlite3_io_methods]
  1593  // object returns an integer which is a vector of these
  1594  // bit values expressing I/O characteristics of the mass storage
  1595  // device that holds the file that the [sqlite3_io_methods]
  1596  // refers to.
  1597  //
  1598  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  1599  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  1600  // mean that writes of blocks that are nnn bytes in size and
  1601  // are aligned to an address which is an integer multiple of
  1602  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  1603  // that when data is appended to a file, the data is appended
  1604  // first then the size of the file is extended, never the other
  1605  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  1606  // information is written to disk in the same order as calls
  1607  // to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that
  1608  // after reboot following a crash or power loss, the only bytes in a
  1609  // file that were written at the application level might have changed
  1610  // and that adjacent bytes, even bytes within the same sector are
  1611  // guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
  1612  // flag indicates that a file cannot be deleted when open.  The
  1613  // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
  1614  // read-only media and cannot be changed even by processes with
  1615  // elevated privileges.
  1616  //
  1617  // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
  1618  // filesystem supports doing multiple write operations atomically when those
  1619  // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
  1620  // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
  1621  
  1622  // CAPI3REF: File Locking Levels
  1623  //
  1624  // SQLite uses one of these integer values as the second
  1625  // argument to calls it makes to the xLock() and xUnlock() methods
  1626  // of an [sqlite3_io_methods] object.
  1627  
  1628  // CAPI3REF: Synchronization Type Flags
  1629  //
  1630  // When SQLite invokes the xSync() method of an
  1631  // [sqlite3_io_methods] object it uses a combination of
  1632  // these integer values as the second argument.
  1633  //
  1634  // When the SQLITE_SYNC_DATAONLY flag is used, it means that the
  1635  // sync operation only needs to flush data to mass storage.  Inode
  1636  // information need not be flushed. If the lower four bits of the flag
  1637  // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
  1638  // If the lower four bits equal SQLITE_SYNC_FULL, that means
  1639  // to use Mac OS X style fullsync instead of fsync().
  1640  //
  1641  // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
  1642  // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
  1643  // settings.  The [synchronous pragma] determines when calls to the
  1644  // xSync VFS method occur and applies uniformly across all platforms.
  1645  // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
  1646  // energetic or rigorous or forceful the sync operations are and
  1647  // only make a difference on Mac OSX for the default SQLite code.
  1648  // (Third-party VFS implementations might also make the distinction
  1649  // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
  1650  // operating systems natively supported by SQLite, only Mac OSX
  1651  // cares about the difference.)
  1652  
  1653  // CAPI3REF: OS Interface Open File Handle
  1654  //
  1655  // An [sqlite3_file] object represents an open file in the
  1656  // [sqlite3_vfs | OS interface layer].  Individual OS interface
  1657  // implementations will
  1658  // want to subclass this object by appending additional fields
  1659  // for their own use.  The pMethods entry is a pointer to an
  1660  // [sqlite3_io_methods] object that defines methods for performing
  1661  // I/O operations on the open file.
  1662  type sqlite3_file = sqlite3_file1 /* sqlite3.h:684:29 */
  1663  type sqlite3_io_methods1 = struct {
  1664  	iVersion               int32
  1665  	_                      [4]byte
  1666  	xClose                 uintptr
  1667  	xRead                  uintptr
  1668  	xWrite                 uintptr
  1669  	xTruncate              uintptr
  1670  	xSync                  uintptr
  1671  	xFileSize              uintptr
  1672  	xLock                  uintptr
  1673  	xUnlock                uintptr
  1674  	xCheckReservedLock     uintptr
  1675  	xFileControl           uintptr
  1676  	xSectorSize            uintptr
  1677  	xDeviceCharacteristics uintptr
  1678  	xShmMap                uintptr
  1679  	xShmLock               uintptr
  1680  	xShmBarrier            uintptr
  1681  	xShmUnmap              uintptr
  1682  	xFetch                 uintptr
  1683  	xUnfetch               uintptr
  1684  } /* sqlite3.h:684:9 */
  1685  
  1686  // CAPI3REF: OS Interface File Virtual Methods Object
  1687  //
  1688  // Every file opened by the [sqlite3_vfs.xOpen] method populates an
  1689  // [sqlite3_file] object (or, more commonly, a subclass of the
  1690  // [sqlite3_file] object) with a pointer to an instance of this object.
  1691  // This object defines the methods used to perform various operations
  1692  // against the open file represented by the [sqlite3_file] object.
  1693  //
  1694  // If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element
  1695  // to a non-NULL pointer, then the sqlite3_io_methods.xClose method
  1696  // may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed.  The
  1697  // only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen]
  1698  // is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element
  1699  // to NULL.
  1700  //
  1701  // The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
  1702  // [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
  1703  // The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
  1704  // flag may be ORed in to indicate that only the data of the file
  1705  // and not its inode needs to be synced.
  1706  //
  1707  // The integer values to xLock() and xUnlock() are one of
  1708  // <ul>
  1709  // <li> [SQLITE_LOCK_NONE],
  1710  // <li> [SQLITE_LOCK_SHARED],
  1711  // <li> [SQLITE_LOCK_RESERVED],
  1712  // <li> [SQLITE_LOCK_PENDING], or
  1713  // <li> [SQLITE_LOCK_EXCLUSIVE].
  1714  // </ul>
  1715  // xLock() increases the lock. xUnlock() decreases the lock.
  1716  // The xCheckReservedLock() method checks whether any database connection,
  1717  // either in this process or in some other process, is holding a RESERVED,
  1718  // PENDING, or EXCLUSIVE lock on the file.  It returns true
  1719  // if such a lock exists and false otherwise.
  1720  //
  1721  // The xFileControl() method is a generic interface that allows custom
  1722  // VFS implementations to directly control an open file using the
  1723  // [sqlite3_file_control()] interface.  The second "op" argument is an
  1724  // integer opcode.  The third argument is a generic pointer intended to
  1725  // point to a structure that may contain arguments or space in which to
  1726  // write return values.  Potential uses for xFileControl() might be
  1727  // functions to enable blocking locks with timeouts, to change the
  1728  // locking strategy (for example to use dot-file locks), to inquire
  1729  // about the status of a lock, or to break stale locks.  The SQLite
  1730  // core reserves all opcodes less than 100 for its own use.
  1731  // A [file control opcodes | list of opcodes] less than 100 is available.
  1732  // Applications that define a custom xFileControl method should use opcodes
  1733  // greater than 100 to avoid conflicts.  VFS implementations should
  1734  // return [SQLITE_NOTFOUND] for file control opcodes that they do not
  1735  // recognize.
  1736  //
  1737  // The xSectorSize() method returns the sector size of the
  1738  // device that underlies the file.  The sector size is the
  1739  // minimum write that can be performed without disturbing
  1740  // other bytes in the file.  The xDeviceCharacteristics()
  1741  // method returns a bit vector describing behaviors of the
  1742  // underlying device:
  1743  //
  1744  // <ul>
  1745  // <li> [SQLITE_IOCAP_ATOMIC]
  1746  // <li> [SQLITE_IOCAP_ATOMIC512]
  1747  // <li> [SQLITE_IOCAP_ATOMIC1K]
  1748  // <li> [SQLITE_IOCAP_ATOMIC2K]
  1749  // <li> [SQLITE_IOCAP_ATOMIC4K]
  1750  // <li> [SQLITE_IOCAP_ATOMIC8K]
  1751  // <li> [SQLITE_IOCAP_ATOMIC16K]
  1752  // <li> [SQLITE_IOCAP_ATOMIC32K]
  1753  // <li> [SQLITE_IOCAP_ATOMIC64K]
  1754  // <li> [SQLITE_IOCAP_SAFE_APPEND]
  1755  // <li> [SQLITE_IOCAP_SEQUENTIAL]
  1756  // <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]
  1757  // <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
  1758  // <li> [SQLITE_IOCAP_IMMUTABLE]
  1759  // <li> [SQLITE_IOCAP_BATCH_ATOMIC]
  1760  // </ul>
  1761  //
  1762  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  1763  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  1764  // mean that writes of blocks that are nnn bytes in size and
  1765  // are aligned to an address which is an integer multiple of
  1766  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  1767  // that when data is appended to a file, the data is appended
  1768  // first then the size of the file is extended, never the other
  1769  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  1770  // information is written to disk in the same order as calls
  1771  // to xWrite().
  1772  //
  1773  // If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
  1774  // in the unread portions of the buffer with zeros.  A VFS that
  1775  // fails to zero-fill short reads might seem to work.  However,
  1776  // failure to zero-fill short reads will eventually lead to
  1777  // database corruption.
  1778  type sqlite3_io_methods = sqlite3_io_methods1 /* sqlite3.h:783:35 */
  1779  
  1780  // CAPI3REF: OS Interface Object
  1781  //
  1782  // An instance of the sqlite3_vfs object defines the interface between
  1783  // the SQLite core and the underlying operating system.  The "vfs"
  1784  // in the name of the object stands for "virtual file system".  See
  1785  // the [VFS | VFS documentation] for further information.
  1786  //
  1787  // The VFS interface is sometimes extended by adding new methods onto
  1788  // the end.  Each time such an extension occurs, the iVersion field
  1789  // is incremented.  The iVersion value started out as 1 in
  1790  // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2
  1791  // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased
  1792  // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields
  1793  // may be appended to the sqlite3_vfs object and the iVersion value
  1794  // may increase again in future versions of SQLite.
  1795  // Note that due to an oversight, the structure
  1796  // of the sqlite3_vfs object changed in the transition from
  1797  // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]
  1798  // and yet the iVersion field was not increased.
  1799  //
  1800  // The szOsFile field is the size of the subclassed [sqlite3_file]
  1801  // structure used by this VFS.  mxPathname is the maximum length of
  1802  // a pathname in this VFS.
  1803  //
  1804  // Registered sqlite3_vfs objects are kept on a linked list formed by
  1805  // the pNext pointer.  The [sqlite3_vfs_register()]
  1806  // and [sqlite3_vfs_unregister()] interfaces manage this list
  1807  // in a thread-safe way.  The [sqlite3_vfs_find()] interface
  1808  // searches the list.  Neither the application code nor the VFS
  1809  // implementation should use the pNext pointer.
  1810  //
  1811  // The pNext field is the only field in the sqlite3_vfs
  1812  // structure that SQLite will ever modify.  SQLite will only access
  1813  // or modify this field while holding a particular static mutex.
  1814  // The application should never modify anything within the sqlite3_vfs
  1815  // object once the object has been registered.
  1816  //
  1817  // The zName field holds the name of the VFS module.  The name must
  1818  // be unique across all VFS modules.
  1819  //
  1820  // [[sqlite3_vfs.xOpen]]
  1821  // ^SQLite guarantees that the zFilename parameter to xOpen
  1822  // is either a NULL pointer or string obtained
  1823  // from xFullPathname() with an optional suffix added.
  1824  // ^If a suffix is added to the zFilename parameter, it will
  1825  // consist of a single "-" character followed by no more than
  1826  // 11 alphanumeric and/or "-" characters.
  1827  // ^SQLite further guarantees that
  1828  // the string will be valid and unchanged until xClose() is
  1829  // called. Because of the previous sentence,
  1830  // the [sqlite3_file] can safely store a pointer to the
  1831  // filename if it needs to remember the filename for some reason.
  1832  // If the zFilename parameter to xOpen is a NULL pointer then xOpen
  1833  // must invent its own temporary name for the file.  ^Whenever the
  1834  // xFilename parameter is NULL it will also be the case that the
  1835  // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
  1836  //
  1837  // The flags argument to xOpen() includes all bits set in
  1838  // the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
  1839  // or [sqlite3_open16()] is used, then flags includes at least
  1840  // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
  1841  // If xOpen() opens a file read-only then it sets *pOutFlags to
  1842  // include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
  1843  //
  1844  // ^(SQLite will also add one of the following flags to the xOpen()
  1845  // call, depending on the object being opened:
  1846  //
  1847  // <ul>
  1848  // <li>  [SQLITE_OPEN_MAIN_DB]
  1849  // <li>  [SQLITE_OPEN_MAIN_JOURNAL]
  1850  // <li>  [SQLITE_OPEN_TEMP_DB]
  1851  // <li>  [SQLITE_OPEN_TEMP_JOURNAL]
  1852  // <li>  [SQLITE_OPEN_TRANSIENT_DB]
  1853  // <li>  [SQLITE_OPEN_SUBJOURNAL]
  1854  // <li>  [SQLITE_OPEN_SUPER_JOURNAL]
  1855  // <li>  [SQLITE_OPEN_WAL]
  1856  // </ul>)^
  1857  //
  1858  // The file I/O implementation can use the object type flags to
  1859  // change the way it deals with files.  For example, an application
  1860  // that does not care about crash recovery or rollback might make
  1861  // the open of a journal file a no-op.  Writes to this journal would
  1862  // also be no-ops, and any attempt to read the journal would return
  1863  // SQLITE_IOERR.  Or the implementation might recognize that a database
  1864  // file will be doing page-aligned sector reads and writes in a random
  1865  // order and set up its I/O subsystem accordingly.
  1866  //
  1867  // SQLite might also add one of the following flags to the xOpen method:
  1868  //
  1869  // <ul>
  1870  // <li> [SQLITE_OPEN_DELETEONCLOSE]
  1871  // <li> [SQLITE_OPEN_EXCLUSIVE]
  1872  // </ul>
  1873  //
  1874  // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
  1875  // deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
  1876  // will be set for TEMP databases and their journals, transient
  1877  // databases, and subjournals.
  1878  //
  1879  // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
  1880  // with the [SQLITE_OPEN_CREATE] flag, which are both directly
  1881  // analogous to the O_EXCL and O_CREAT flags of the POSIX open()
  1882  // API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
  1883  // SQLITE_OPEN_CREATE, is used to indicate that file should always
  1884  // be created, and that it is an error if it already exists.
  1885  // It is <i>not</i> used to indicate the file should be opened
  1886  // for exclusive access.
  1887  //
  1888  // ^At least szOsFile bytes of memory are allocated by SQLite
  1889  // to hold the [sqlite3_file] structure passed as the third
  1890  // argument to xOpen.  The xOpen method does not have to
  1891  // allocate the structure; it should just fill it in.  Note that
  1892  // the xOpen method must set the sqlite3_file.pMethods to either
  1893  // a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
  1894  // this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
  1895  // element will be valid after xOpen returns regardless of the success
  1896  // or failure of the xOpen call.
  1897  //
  1898  // [[sqlite3_vfs.xAccess]]
  1899  // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
  1900  // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
  1901  // test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
  1902  // to test whether a file is at least readable.  The SQLITE_ACCESS_READ
  1903  // flag is never actually used and is not implemented in the built-in
  1904  // VFSes of SQLite.  The file is named by the second argument and can be a
  1905  // directory. The xAccess method returns [SQLITE_OK] on success or some
  1906  // non-zero error code if there is an I/O error or if the name of
  1907  // the file given in the second argument is illegal.  If SQLITE_OK
  1908  // is returned, then non-zero or zero is written into *pResOut to indicate
  1909  // whether or not the file is accessible.
  1910  //
  1911  // ^SQLite will always allocate at least mxPathname+1 bytes for the
  1912  // output buffer xFullPathname.  The exact size of the output buffer
  1913  // is also passed as a parameter to both  methods. If the output buffer
  1914  // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
  1915  // handled as a fatal error by SQLite, vfs implementations should endeavor
  1916  // to prevent this by setting mxPathname to a sufficiently large value.
  1917  //
  1918  // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
  1919  // interfaces are not strictly a part of the filesystem, but they are
  1920  // included in the VFS structure for completeness.
  1921  // The xRandomness() function attempts to return nBytes bytes
  1922  // of good-quality randomness into zOut.  The return value is
  1923  // the actual number of bytes of randomness obtained.
  1924  // The xSleep() method causes the calling thread to sleep for at
  1925  // least the number of microseconds given.  ^The xCurrentTime()
  1926  // method returns a Julian Day Number for the current date and time as
  1927  // a floating point value.
  1928  // ^The xCurrentTimeInt64() method returns, as an integer, the Julian
  1929  // Day Number multiplied by 86400000 (the number of milliseconds in
  1930  // a 24-hour day).
  1931  // ^SQLite will use the xCurrentTimeInt64() method to get the current
  1932  // date and time if that method is available (if iVersion is 2 or
  1933  // greater and the function pointer is not NULL) and will fall back
  1934  // to xCurrentTime() if xCurrentTimeInt64() is unavailable.
  1935  //
  1936  // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
  1937  // are not used by the SQLite core.  These optional interfaces are provided
  1938  // by some VFSes to facilitate testing of the VFS code. By overriding
  1939  // system calls with functions under its control, a test program can
  1940  // simulate faults and error conditions that would otherwise be difficult
  1941  // or impossible to induce.  The set of system calls that can be overridden
  1942  // varies from one VFS to another, and from one version of the same VFS to the
  1943  // next.  Applications that use these interfaces must be prepared for any
  1944  // or all of these interfaces to be NULL or for their behavior to change
  1945  // from one release to the next.  Applications must not attempt to access
  1946  // any of these methods if the iVersion of the VFS is less than 3.
  1947  type sqlite3_vfs1 = struct {
  1948  	iVersion          int32
  1949  	szOsFile          int32
  1950  	mxPathname        int32
  1951  	_                 [4]byte
  1952  	pNext             uintptr
  1953  	zName             uintptr
  1954  	pAppData          uintptr
  1955  	xOpen             uintptr
  1956  	xDelete           uintptr
  1957  	xAccess           uintptr
  1958  	xFullPathname     uintptr
  1959  	xDlOpen           uintptr
  1960  	xDlError          uintptr
  1961  	xDlSym            uintptr
  1962  	xDlClose          uintptr
  1963  	xRandomness       uintptr
  1964  	xSleep            uintptr
  1965  	xCurrentTime      uintptr
  1966  	xGetLastError     uintptr
  1967  	xCurrentTimeInt64 uintptr
  1968  	xSetSystemCall    uintptr
  1969  	xGetSystemCall    uintptr
  1970  	xNextSystemCall   uintptr
  1971  } /* sqlite3.h:1368:9 */
  1972  
  1973  // CAPI3REF: OS Interface Object
  1974  //
  1975  // An instance of the sqlite3_vfs object defines the interface between
  1976  // the SQLite core and the underlying operating system.  The "vfs"
  1977  // in the name of the object stands for "virtual file system".  See
  1978  // the [VFS | VFS documentation] for further information.
  1979  //
  1980  // The VFS interface is sometimes extended by adding new methods onto
  1981  // the end.  Each time such an extension occurs, the iVersion field
  1982  // is incremented.  The iVersion value started out as 1 in
  1983  // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2
  1984  // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased
  1985  // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields
  1986  // may be appended to the sqlite3_vfs object and the iVersion value
  1987  // may increase again in future versions of SQLite.
  1988  // Note that due to an oversight, the structure
  1989  // of the sqlite3_vfs object changed in the transition from
  1990  // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]
  1991  // and yet the iVersion field was not increased.
  1992  //
  1993  // The szOsFile field is the size of the subclassed [sqlite3_file]
  1994  // structure used by this VFS.  mxPathname is the maximum length of
  1995  // a pathname in this VFS.
  1996  //
  1997  // Registered sqlite3_vfs objects are kept on a linked list formed by
  1998  // the pNext pointer.  The [sqlite3_vfs_register()]
  1999  // and [sqlite3_vfs_unregister()] interfaces manage this list
  2000  // in a thread-safe way.  The [sqlite3_vfs_find()] interface
  2001  // searches the list.  Neither the application code nor the VFS
  2002  // implementation should use the pNext pointer.
  2003  //
  2004  // The pNext field is the only field in the sqlite3_vfs
  2005  // structure that SQLite will ever modify.  SQLite will only access
  2006  // or modify this field while holding a particular static mutex.
  2007  // The application should never modify anything within the sqlite3_vfs
  2008  // object once the object has been registered.
  2009  //
  2010  // The zName field holds the name of the VFS module.  The name must
  2011  // be unique across all VFS modules.
  2012  //
  2013  // [[sqlite3_vfs.xOpen]]
  2014  // ^SQLite guarantees that the zFilename parameter to xOpen
  2015  // is either a NULL pointer or string obtained
  2016  // from xFullPathname() with an optional suffix added.
  2017  // ^If a suffix is added to the zFilename parameter, it will
  2018  // consist of a single "-" character followed by no more than
  2019  // 11 alphanumeric and/or "-" characters.
  2020  // ^SQLite further guarantees that
  2021  // the string will be valid and unchanged until xClose() is
  2022  // called. Because of the previous sentence,
  2023  // the [sqlite3_file] can safely store a pointer to the
  2024  // filename if it needs to remember the filename for some reason.
  2025  // If the zFilename parameter to xOpen is a NULL pointer then xOpen
  2026  // must invent its own temporary name for the file.  ^Whenever the
  2027  // xFilename parameter is NULL it will also be the case that the
  2028  // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
  2029  //
  2030  // The flags argument to xOpen() includes all bits set in
  2031  // the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
  2032  // or [sqlite3_open16()] is used, then flags includes at least
  2033  // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
  2034  // If xOpen() opens a file read-only then it sets *pOutFlags to
  2035  // include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
  2036  //
  2037  // ^(SQLite will also add one of the following flags to the xOpen()
  2038  // call, depending on the object being opened:
  2039  //
  2040  // <ul>
  2041  // <li>  [SQLITE_OPEN_MAIN_DB]
  2042  // <li>  [SQLITE_OPEN_MAIN_JOURNAL]
  2043  // <li>  [SQLITE_OPEN_TEMP_DB]
  2044  // <li>  [SQLITE_OPEN_TEMP_JOURNAL]
  2045  // <li>  [SQLITE_OPEN_TRANSIENT_DB]
  2046  // <li>  [SQLITE_OPEN_SUBJOURNAL]
  2047  // <li>  [SQLITE_OPEN_SUPER_JOURNAL]
  2048  // <li>  [SQLITE_OPEN_WAL]
  2049  // </ul>)^
  2050  //
  2051  // The file I/O implementation can use the object type flags to
  2052  // change the way it deals with files.  For example, an application
  2053  // that does not care about crash recovery or rollback might make
  2054  // the open of a journal file a no-op.  Writes to this journal would
  2055  // also be no-ops, and any attempt to read the journal would return
  2056  // SQLITE_IOERR.  Or the implementation might recognize that a database
  2057  // file will be doing page-aligned sector reads and writes in a random
  2058  // order and set up its I/O subsystem accordingly.
  2059  //
  2060  // SQLite might also add one of the following flags to the xOpen method:
  2061  //
  2062  // <ul>
  2063  // <li> [SQLITE_OPEN_DELETEONCLOSE]
  2064  // <li> [SQLITE_OPEN_EXCLUSIVE]
  2065  // </ul>
  2066  //
  2067  // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
  2068  // deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
  2069  // will be set for TEMP databases and their journals, transient
  2070  // databases, and subjournals.
  2071  //
  2072  // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
  2073  // with the [SQLITE_OPEN_CREATE] flag, which are both directly
  2074  // analogous to the O_EXCL and O_CREAT flags of the POSIX open()
  2075  // API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
  2076  // SQLITE_OPEN_CREATE, is used to indicate that file should always
  2077  // be created, and that it is an error if it already exists.
  2078  // It is <i>not</i> used to indicate the file should be opened
  2079  // for exclusive access.
  2080  //
  2081  // ^At least szOsFile bytes of memory are allocated by SQLite
  2082  // to hold the [sqlite3_file] structure passed as the third
  2083  // argument to xOpen.  The xOpen method does not have to
  2084  // allocate the structure; it should just fill it in.  Note that
  2085  // the xOpen method must set the sqlite3_file.pMethods to either
  2086  // a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
  2087  // this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
  2088  // element will be valid after xOpen returns regardless of the success
  2089  // or failure of the xOpen call.
  2090  //
  2091  // [[sqlite3_vfs.xAccess]]
  2092  // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
  2093  // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
  2094  // test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
  2095  // to test whether a file is at least readable.  The SQLITE_ACCESS_READ
  2096  // flag is never actually used and is not implemented in the built-in
  2097  // VFSes of SQLite.  The file is named by the second argument and can be a
  2098  // directory. The xAccess method returns [SQLITE_OK] on success or some
  2099  // non-zero error code if there is an I/O error or if the name of
  2100  // the file given in the second argument is illegal.  If SQLITE_OK
  2101  // is returned, then non-zero or zero is written into *pResOut to indicate
  2102  // whether or not the file is accessible.
  2103  //
  2104  // ^SQLite will always allocate at least mxPathname+1 bytes for the
  2105  // output buffer xFullPathname.  The exact size of the output buffer
  2106  // is also passed as a parameter to both  methods. If the output buffer
  2107  // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
  2108  // handled as a fatal error by SQLite, vfs implementations should endeavor
  2109  // to prevent this by setting mxPathname to a sufficiently large value.
  2110  //
  2111  // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
  2112  // interfaces are not strictly a part of the filesystem, but they are
  2113  // included in the VFS structure for completeness.
  2114  // The xRandomness() function attempts to return nBytes bytes
  2115  // of good-quality randomness into zOut.  The return value is
  2116  // the actual number of bytes of randomness obtained.
  2117  // The xSleep() method causes the calling thread to sleep for at
  2118  // least the number of microseconds given.  ^The xCurrentTime()
  2119  // method returns a Julian Day Number for the current date and time as
  2120  // a floating point value.
  2121  // ^The xCurrentTimeInt64() method returns, as an integer, the Julian
  2122  // Day Number multiplied by 86400000 (the number of milliseconds in
  2123  // a 24-hour day).
  2124  // ^SQLite will use the xCurrentTimeInt64() method to get the current
  2125  // date and time if that method is available (if iVersion is 2 or
  2126  // greater and the function pointer is not NULL) and will fall back
  2127  // to xCurrentTime() if xCurrentTimeInt64() is unavailable.
  2128  //
  2129  // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
  2130  // are not used by the SQLite core.  These optional interfaces are provided
  2131  // by some VFSes to facilitate testing of the VFS code. By overriding
  2132  // system calls with functions under its control, a test program can
  2133  // simulate faults and error conditions that would otherwise be difficult
  2134  // or impossible to induce.  The set of system calls that can be overridden
  2135  // varies from one VFS to another, and from one version of the same VFS to the
  2136  // next.  Applications that use these interfaces must be prepared for any
  2137  // or all of these interfaces to be NULL or for their behavior to change
  2138  // from one release to the next.  Applications must not attempt to access
  2139  // any of these methods if the iVersion of the VFS is less than 3.
  2140  type sqlite3_vfs = sqlite3_vfs1    /* sqlite3.h:1368:28 */
  2141  type sqlite3_syscall_ptr = uintptr /* sqlite3.h:1369:14 */
  2142  
  2143  // CAPI3REF: Memory Allocation Routines
  2144  //
  2145  // An instance of this object defines the interface between SQLite
  2146  // and low-level memory allocation routines.
  2147  //
  2148  // This object is used in only one place in the SQLite interface.
  2149  // A pointer to an instance of this object is the argument to
  2150  // [sqlite3_config()] when the configuration option is
  2151  // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
  2152  // By creating an instance of this object
  2153  // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
  2154  // during configuration, an application can specify an alternative
  2155  // memory allocation subsystem for SQLite to use for all of its
  2156  // dynamic memory needs.
  2157  //
  2158  // Note that SQLite comes with several [built-in memory allocators]
  2159  // that are perfectly adequate for the overwhelming majority of applications
  2160  // and that this object is only useful to a tiny minority of applications
  2161  // with specialized memory allocation requirements.  This object is
  2162  // also used during testing of SQLite in order to specify an alternative
  2163  // memory allocator that simulates memory out-of-memory conditions in
  2164  // order to verify that SQLite recovers gracefully from such
  2165  // conditions.
  2166  //
  2167  // The xMalloc, xRealloc, and xFree methods must work like the
  2168  // malloc(), realloc() and free() functions from the standard C library.
  2169  // ^SQLite guarantees that the second argument to
  2170  // xRealloc is always a value returned by a prior call to xRoundup.
  2171  //
  2172  // xSize should return the allocated size of a memory allocation
  2173  // previously obtained from xMalloc or xRealloc.  The allocated size
  2174  // is always at least as big as the requested size but may be larger.
  2175  //
  2176  // The xRoundup method returns what would be the allocated size of
  2177  // a memory allocation given a particular requested size.  Most memory
  2178  // allocators round up memory allocations at least to the next multiple
  2179  // of 8.  Some allocators round up to a larger multiple or to a power of 2.
  2180  // Every memory allocation request coming in through [sqlite3_malloc()]
  2181  // or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,
  2182  // that causes the corresponding memory allocation to fail.
  2183  //
  2184  // The xInit method initializes the memory allocator.  For example,
  2185  // it might allocate any required mutexes or initialize internal data
  2186  // structures.  The xShutdown method is invoked (indirectly) by
  2187  // [sqlite3_shutdown()] and should deallocate any resources acquired
  2188  // by xInit.  The pAppData pointer is used as the only parameter to
  2189  // xInit and xShutdown.
  2190  //
  2191  // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes
  2192  // the xInit method, so the xInit method need not be threadsafe.  The
  2193  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  2194  // not need to be threadsafe either.  For all other methods, SQLite
  2195  // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
  2196  // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
  2197  // it is by default) and so the methods are automatically serialized.
  2198  // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
  2199  // methods must be threadsafe or else make their own arrangements for
  2200  // serialization.
  2201  //
  2202  // SQLite will never invoke xInit() more than once without an intervening
  2203  // call to xShutdown().
  2204  type sqlite3_mem_methods1 = struct {
  2205  	xMalloc   uintptr
  2206  	xFree     uintptr
  2207  	xRealloc  uintptr
  2208  	xSize     uintptr
  2209  	xRoundup  uintptr
  2210  	xInit     uintptr
  2211  	xShutdown uintptr
  2212  	pAppData  uintptr
  2213  } /* sqlite3.h:1666:9 */
  2214  
  2215  // CAPI3REF: Memory Allocation Routines
  2216  //
  2217  // An instance of this object defines the interface between SQLite
  2218  // and low-level memory allocation routines.
  2219  //
  2220  // This object is used in only one place in the SQLite interface.
  2221  // A pointer to an instance of this object is the argument to
  2222  // [sqlite3_config()] when the configuration option is
  2223  // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
  2224  // By creating an instance of this object
  2225  // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
  2226  // during configuration, an application can specify an alternative
  2227  // memory allocation subsystem for SQLite to use for all of its
  2228  // dynamic memory needs.
  2229  //
  2230  // Note that SQLite comes with several [built-in memory allocators]
  2231  // that are perfectly adequate for the overwhelming majority of applications
  2232  // and that this object is only useful to a tiny minority of applications
  2233  // with specialized memory allocation requirements.  This object is
  2234  // also used during testing of SQLite in order to specify an alternative
  2235  // memory allocator that simulates memory out-of-memory conditions in
  2236  // order to verify that SQLite recovers gracefully from such
  2237  // conditions.
  2238  //
  2239  // The xMalloc, xRealloc, and xFree methods must work like the
  2240  // malloc(), realloc() and free() functions from the standard C library.
  2241  // ^SQLite guarantees that the second argument to
  2242  // xRealloc is always a value returned by a prior call to xRoundup.
  2243  //
  2244  // xSize should return the allocated size of a memory allocation
  2245  // previously obtained from xMalloc or xRealloc.  The allocated size
  2246  // is always at least as big as the requested size but may be larger.
  2247  //
  2248  // The xRoundup method returns what would be the allocated size of
  2249  // a memory allocation given a particular requested size.  Most memory
  2250  // allocators round up memory allocations at least to the next multiple
  2251  // of 8.  Some allocators round up to a larger multiple or to a power of 2.
  2252  // Every memory allocation request coming in through [sqlite3_malloc()]
  2253  // or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,
  2254  // that causes the corresponding memory allocation to fail.
  2255  //
  2256  // The xInit method initializes the memory allocator.  For example,
  2257  // it might allocate any required mutexes or initialize internal data
  2258  // structures.  The xShutdown method is invoked (indirectly) by
  2259  // [sqlite3_shutdown()] and should deallocate any resources acquired
  2260  // by xInit.  The pAppData pointer is used as the only parameter to
  2261  // xInit and xShutdown.
  2262  //
  2263  // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes
  2264  // the xInit method, so the xInit method need not be threadsafe.  The
  2265  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  2266  // not need to be threadsafe either.  For all other methods, SQLite
  2267  // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
  2268  // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
  2269  // it is by default) and so the methods are automatically serialized.
  2270  // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
  2271  // methods must be threadsafe or else make their own arrangements for
  2272  // serialization.
  2273  //
  2274  // SQLite will never invoke xInit() more than once without an intervening
  2275  // call to xShutdown().
  2276  type sqlite3_mem_methods = sqlite3_mem_methods1 /* sqlite3.h:1666:36 */
  2277  
  2278  // CAPI3REF: Constants Defining Special Destructor Behavior
  2279  //
  2280  // These are special values for the destructor that is passed in as the
  2281  // final argument to routines like [sqlite3_result_blob()].  ^If the destructor
  2282  // argument is SQLITE_STATIC, it means that the content pointer is constant
  2283  // and will never change.  It does not need to be destroyed.  ^The
  2284  // SQLITE_TRANSIENT value means that the content will likely change in
  2285  // the near future and that SQLite should make its own private copy of
  2286  // the content before returning.
  2287  //
  2288  // The typedef is necessary to work around problems in certain
  2289  // C++ compilers.
  2290  type sqlite3_destructor_type = uintptr /* sqlite3.h:5635:14 */
  2291  
  2292  // The interface to the virtual-table mechanism is currently considered
  2293  // to be experimental.  The interface might change in incompatible ways.
  2294  // If this is a problem for you, do not use the interface at this time.
  2295  //
  2296  // When the virtual-table mechanism stabilizes, we will declare the
  2297  // interface fixed, support it indefinitely, and remove this comment.
  2298  
  2299  // Structures used by the virtual table interface
  2300  type sqlite3_vtab1 = struct {
  2301  	pModule uintptr
  2302  	nRef    int32
  2303  	_       [4]byte
  2304  	zErrMsg uintptr
  2305  } /* sqlite3.h:6754:9 */
  2306  
  2307  // The interface to the virtual-table mechanism is currently considered
  2308  // to be experimental.  The interface might change in incompatible ways.
  2309  // If this is a problem for you, do not use the interface at this time.
  2310  //
  2311  // When the virtual-table mechanism stabilizes, we will declare the
  2312  // interface fixed, support it indefinitely, and remove this comment.
  2313  
  2314  // Structures used by the virtual table interface
  2315  type sqlite3_vtab = sqlite3_vtab1 /* sqlite3.h:6754:29 */
  2316  type sqlite3_index_info1 = struct {
  2317  	nConstraint      int32
  2318  	_                [4]byte
  2319  	aConstraint      uintptr
  2320  	nOrderBy         int32
  2321  	_                [4]byte
  2322  	aOrderBy         uintptr
  2323  	aConstraintUsage uintptr
  2324  	idxNum           int32
  2325  	_                [4]byte
  2326  	idxStr           uintptr
  2327  	needToFreeIdxStr int32
  2328  	orderByConsumed  int32
  2329  	estimatedCost    float64
  2330  	estimatedRows    sqlite3_int64
  2331  	idxFlags         int32
  2332  	_                [4]byte
  2333  	colUsed          sqlite3_uint64
  2334  } /* sqlite3.h:6755:9 */
  2335  
  2336  type sqlite3_index_info = sqlite3_index_info1       /* sqlite3.h:6755:35 */
  2337  type sqlite3_vtab_cursor1 = struct{ pVtab uintptr } /* sqlite3.h:6756:9 */
  2338  
  2339  type sqlite3_vtab_cursor = sqlite3_vtab_cursor1 /* sqlite3.h:6756:36 */
  2340  type sqlite3_module1 = struct {
  2341  	iVersion      int32
  2342  	_             [4]byte
  2343  	xCreate       uintptr
  2344  	xConnect      uintptr
  2345  	xBestIndex    uintptr
  2346  	xDisconnect   uintptr
  2347  	xDestroy      uintptr
  2348  	xOpen         uintptr
  2349  	xClose        uintptr
  2350  	xFilter       uintptr
  2351  	xNext         uintptr
  2352  	xEof          uintptr
  2353  	xColumn       uintptr
  2354  	xRowid        uintptr
  2355  	xUpdate       uintptr
  2356  	xBegin        uintptr
  2357  	xSync         uintptr
  2358  	xCommit       uintptr
  2359  	xRollback     uintptr
  2360  	xFindFunction uintptr
  2361  	xRename       uintptr
  2362  	xSavepoint    uintptr
  2363  	xRelease      uintptr
  2364  	xRollbackTo   uintptr
  2365  	xShadowName   uintptr
  2366  } /* sqlite3.h:6754:9 */
  2367  
  2368  type sqlite3_module = sqlite3_module1 /* sqlite3.h:6757:31 */
  2369  
  2370  // CAPI3REF: Virtual Table Indexing Information
  2371  // KEYWORDS: sqlite3_index_info
  2372  //
  2373  // The sqlite3_index_info structure and its substructures is used as part
  2374  // of the [virtual table] interface to
  2375  // pass information into and receive the reply from the [xBestIndex]
  2376  // method of a [virtual table module].  The fields under **Inputs** are the
  2377  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2378  // results into the **Outputs** fields.
  2379  //
  2380  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2381  //
  2382  // <blockquote>column OP expr</blockquote>
  2383  //
  2384  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2385  // stored in aConstraint[].op using one of the
  2386  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2387  // ^(The index of the column is stored in
  2388  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2389  // expr on the right-hand side can be evaluated (and thus the constraint
  2390  // is usable) and false if it cannot.)^
  2391  //
  2392  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2393  // and makes other simplifications to the WHERE clause in an attempt to
  2394  // get as many WHERE clause terms into the form shown above as possible.
  2395  // ^The aConstraint[] array only reports WHERE clause terms that are
  2396  // relevant to the particular virtual table being queried.
  2397  //
  2398  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2399  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2400  //
  2401  // The colUsed field indicates which columns of the virtual table may be
  2402  // required by the current scan. Virtual table columns are numbered from
  2403  // zero in the order in which they appear within the CREATE TABLE statement
  2404  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2405  // the corresponding bit is set within the colUsed mask if the column may be
  2406  // required by SQLite. If the table has at least 64 columns and any column
  2407  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2408  // set. In other words, column iCol may be required if the expression
  2409  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2410  // non-zero.
  2411  //
  2412  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2413  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2414  // the right-hand side of the corresponding aConstraint[] is evaluated
  2415  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2416  // is true, then the constraint is assumed to be fully handled by the
  2417  // virtual table and might not be checked again by the byte code.)^ ^(The
  2418  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2419  // is left in its default setting of false, the constraint will always be
  2420  // checked separately in byte code.  If the omit flag is change to true, then
  2421  // the constraint may or may not be checked in byte code.  In other words,
  2422  // when the omit flag is true there is no guarantee that the constraint will
  2423  // not be checked again using byte code.)^
  2424  //
  2425  // ^The idxNum and idxPtr values are recorded and passed into the
  2426  // [xFilter] method.
  2427  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2428  // needToFreeIdxPtr is true.
  2429  //
  2430  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2431  // the correct order to satisfy the ORDER BY clause so that no separate
  2432  // sorting step is required.
  2433  //
  2434  // ^The estimatedCost value is an estimate of the cost of a particular
  2435  // strategy. A cost of N indicates that the cost of the strategy is similar
  2436  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2437  // indicates that the expense of the operation is similar to that of a
  2438  // binary search on a unique indexed field of an SQLite table with N rows.
  2439  //
  2440  // ^The estimatedRows value is an estimate of the number of rows that
  2441  // will be returned by the strategy.
  2442  //
  2443  // The xBestIndex method may optionally populate the idxFlags field with a
  2444  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2445  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2446  // assumes that the strategy may visit at most one row.
  2447  //
  2448  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2449  // SQLite also assumes that if a call to the xUpdate() method is made as
  2450  // part of the same statement to delete or update a virtual table row and the
  2451  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2452  // any database changes. In other words, if the xUpdate() returns
  2453  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2454  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2455  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2456  // the xUpdate method are automatically rolled back by SQLite.
  2457  //
  2458  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2459  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2460  // If a virtual table extension is
  2461  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2462  // to read or write the estimatedRows field are undefined (but are likely
  2463  // to include crashing the application). The estimatedRows field should
  2464  // therefore only be used if [sqlite3_libversion_number()] returns a
  2465  // value greater than or equal to 3008002. Similarly, the idxFlags field
  2466  // was added for [version 3.9.0] ([dateof:3.9.0]).
  2467  // It may therefore only be used if
  2468  // sqlite3_libversion_number() returns a value greater than or equal to
  2469  // 3009000.
  2470  type sqlite3_index_constraint = struct {
  2471  	iColumn     int32
  2472  	op          uint8
  2473  	usable      uint8
  2474  	_           [2]byte
  2475  	iTermOffset int32
  2476  } /* sqlite3.h:6755:9 */
  2477  
  2478  // CAPI3REF: Virtual Table Indexing Information
  2479  // KEYWORDS: sqlite3_index_info
  2480  //
  2481  // The sqlite3_index_info structure and its substructures is used as part
  2482  // of the [virtual table] interface to
  2483  // pass information into and receive the reply from the [xBestIndex]
  2484  // method of a [virtual table module].  The fields under **Inputs** are the
  2485  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2486  // results into the **Outputs** fields.
  2487  //
  2488  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2489  //
  2490  // <blockquote>column OP expr</blockquote>
  2491  //
  2492  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2493  // stored in aConstraint[].op using one of the
  2494  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2495  // ^(The index of the column is stored in
  2496  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2497  // expr on the right-hand side can be evaluated (and thus the constraint
  2498  // is usable) and false if it cannot.)^
  2499  //
  2500  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2501  // and makes other simplifications to the WHERE clause in an attempt to
  2502  // get as many WHERE clause terms into the form shown above as possible.
  2503  // ^The aConstraint[] array only reports WHERE clause terms that are
  2504  // relevant to the particular virtual table being queried.
  2505  //
  2506  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2507  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2508  //
  2509  // The colUsed field indicates which columns of the virtual table may be
  2510  // required by the current scan. Virtual table columns are numbered from
  2511  // zero in the order in which they appear within the CREATE TABLE statement
  2512  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2513  // the corresponding bit is set within the colUsed mask if the column may be
  2514  // required by SQLite. If the table has at least 64 columns and any column
  2515  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2516  // set. In other words, column iCol may be required if the expression
  2517  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2518  // non-zero.
  2519  //
  2520  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2521  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2522  // the right-hand side of the corresponding aConstraint[] is evaluated
  2523  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2524  // is true, then the constraint is assumed to be fully handled by the
  2525  // virtual table and might not be checked again by the byte code.)^ ^(The
  2526  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2527  // is left in its default setting of false, the constraint will always be
  2528  // checked separately in byte code.  If the omit flag is change to true, then
  2529  // the constraint may or may not be checked in byte code.  In other words,
  2530  // when the omit flag is true there is no guarantee that the constraint will
  2531  // not be checked again using byte code.)^
  2532  //
  2533  // ^The idxNum and idxPtr values are recorded and passed into the
  2534  // [xFilter] method.
  2535  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2536  // needToFreeIdxPtr is true.
  2537  //
  2538  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2539  // the correct order to satisfy the ORDER BY clause so that no separate
  2540  // sorting step is required.
  2541  //
  2542  // ^The estimatedCost value is an estimate of the cost of a particular
  2543  // strategy. A cost of N indicates that the cost of the strategy is similar
  2544  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2545  // indicates that the expense of the operation is similar to that of a
  2546  // binary search on a unique indexed field of an SQLite table with N rows.
  2547  //
  2548  // ^The estimatedRows value is an estimate of the number of rows that
  2549  // will be returned by the strategy.
  2550  //
  2551  // The xBestIndex method may optionally populate the idxFlags field with a
  2552  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2553  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2554  // assumes that the strategy may visit at most one row.
  2555  //
  2556  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2557  // SQLite also assumes that if a call to the xUpdate() method is made as
  2558  // part of the same statement to delete or update a virtual table row and the
  2559  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2560  // any database changes. In other words, if the xUpdate() returns
  2561  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2562  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2563  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2564  // the xUpdate method are automatically rolled back by SQLite.
  2565  //
  2566  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2567  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2568  // If a virtual table extension is
  2569  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2570  // to read or write the estimatedRows field are undefined (but are likely
  2571  // to include crashing the application). The estimatedRows field should
  2572  // therefore only be used if [sqlite3_libversion_number()] returns a
  2573  // value greater than or equal to 3008002. Similarly, the idxFlags field
  2574  // was added for [version 3.9.0] ([dateof:3.9.0]).
  2575  // It may therefore only be used if
  2576  // sqlite3_libversion_number() returns a value greater than or equal to
  2577  // 3009000.
  2578  type sqlite3_index_orderby = struct {
  2579  	iColumn int32
  2580  	desc    uint8
  2581  	_       [3]byte
  2582  } /* sqlite3.h:6755:9 */
  2583  
  2584  // CAPI3REF: Virtual Table Indexing Information
  2585  // KEYWORDS: sqlite3_index_info
  2586  //
  2587  // The sqlite3_index_info structure and its substructures is used as part
  2588  // of the [virtual table] interface to
  2589  // pass information into and receive the reply from the [xBestIndex]
  2590  // method of a [virtual table module].  The fields under **Inputs** are the
  2591  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2592  // results into the **Outputs** fields.
  2593  //
  2594  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2595  //
  2596  // <blockquote>column OP expr</blockquote>
  2597  //
  2598  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2599  // stored in aConstraint[].op using one of the
  2600  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2601  // ^(The index of the column is stored in
  2602  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2603  // expr on the right-hand side can be evaluated (and thus the constraint
  2604  // is usable) and false if it cannot.)^
  2605  //
  2606  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2607  // and makes other simplifications to the WHERE clause in an attempt to
  2608  // get as many WHERE clause terms into the form shown above as possible.
  2609  // ^The aConstraint[] array only reports WHERE clause terms that are
  2610  // relevant to the particular virtual table being queried.
  2611  //
  2612  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2613  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2614  //
  2615  // The colUsed field indicates which columns of the virtual table may be
  2616  // required by the current scan. Virtual table columns are numbered from
  2617  // zero in the order in which they appear within the CREATE TABLE statement
  2618  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2619  // the corresponding bit is set within the colUsed mask if the column may be
  2620  // required by SQLite. If the table has at least 64 columns and any column
  2621  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2622  // set. In other words, column iCol may be required if the expression
  2623  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2624  // non-zero.
  2625  //
  2626  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2627  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2628  // the right-hand side of the corresponding aConstraint[] is evaluated
  2629  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2630  // is true, then the constraint is assumed to be fully handled by the
  2631  // virtual table and might not be checked again by the byte code.)^ ^(The
  2632  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2633  // is left in its default setting of false, the constraint will always be
  2634  // checked separately in byte code.  If the omit flag is change to true, then
  2635  // the constraint may or may not be checked in byte code.  In other words,
  2636  // when the omit flag is true there is no guarantee that the constraint will
  2637  // not be checked again using byte code.)^
  2638  //
  2639  // ^The idxNum and idxPtr values are recorded and passed into the
  2640  // [xFilter] method.
  2641  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2642  // needToFreeIdxPtr is true.
  2643  //
  2644  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2645  // the correct order to satisfy the ORDER BY clause so that no separate
  2646  // sorting step is required.
  2647  //
  2648  // ^The estimatedCost value is an estimate of the cost of a particular
  2649  // strategy. A cost of N indicates that the cost of the strategy is similar
  2650  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2651  // indicates that the expense of the operation is similar to that of a
  2652  // binary search on a unique indexed field of an SQLite table with N rows.
  2653  //
  2654  // ^The estimatedRows value is an estimate of the number of rows that
  2655  // will be returned by the strategy.
  2656  //
  2657  // The xBestIndex method may optionally populate the idxFlags field with a
  2658  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2659  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2660  // assumes that the strategy may visit at most one row.
  2661  //
  2662  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2663  // SQLite also assumes that if a call to the xUpdate() method is made as
  2664  // part of the same statement to delete or update a virtual table row and the
  2665  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2666  // any database changes. In other words, if the xUpdate() returns
  2667  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2668  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2669  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2670  // the xUpdate method are automatically rolled back by SQLite.
  2671  //
  2672  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2673  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2674  // If a virtual table extension is
  2675  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2676  // to read or write the estimatedRows field are undefined (but are likely
  2677  // to include crashing the application). The estimatedRows field should
  2678  // therefore only be used if [sqlite3_libversion_number()] returns a
  2679  // value greater than or equal to 3008002. Similarly, the idxFlags field
  2680  // was added for [version 3.9.0] ([dateof:3.9.0]).
  2681  // It may therefore only be used if
  2682  // sqlite3_libversion_number() returns a value greater than or equal to
  2683  // 3009000.
  2684  type sqlite3_index_constraint_usage = struct {
  2685  	argvIndex int32
  2686  	omit      uint8
  2687  	_         [3]byte
  2688  } /* sqlite3.h:6755:9 */
  2689  
  2690  // CAPI3REF: Mutex Methods Object
  2691  //
  2692  // An instance of this structure defines the low-level routines
  2693  // used to allocate and use mutexes.
  2694  //
  2695  // Usually, the default mutex implementations provided by SQLite are
  2696  // sufficient, however the application has the option of substituting a custom
  2697  // implementation for specialized deployments or systems for which SQLite
  2698  // does not provide a suitable implementation. In this case, the application
  2699  // creates and populates an instance of this structure to pass
  2700  // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
  2701  // Additionally, an instance of this structure can be used as an
  2702  // output variable when querying the system for the current mutex
  2703  // implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
  2704  //
  2705  // ^The xMutexInit method defined by this structure is invoked as
  2706  // part of system initialization by the sqlite3_initialize() function.
  2707  // ^The xMutexInit routine is called by SQLite exactly once for each
  2708  // effective call to [sqlite3_initialize()].
  2709  //
  2710  // ^The xMutexEnd method defined by this structure is invoked as
  2711  // part of system shutdown by the sqlite3_shutdown() function. The
  2712  // implementation of this method is expected to release all outstanding
  2713  // resources obtained by the mutex methods implementation, especially
  2714  // those obtained by the xMutexInit method.  ^The xMutexEnd()
  2715  // interface is invoked exactly once for each call to [sqlite3_shutdown()].
  2716  //
  2717  // ^(The remaining seven methods defined by this structure (xMutexAlloc,
  2718  // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
  2719  // xMutexNotheld) implement the following interfaces (respectively):
  2720  //
  2721  // <ul>
  2722  //   <li>  [sqlite3_mutex_alloc()] </li>
  2723  //   <li>  [sqlite3_mutex_free()] </li>
  2724  //   <li>  [sqlite3_mutex_enter()] </li>
  2725  //   <li>  [sqlite3_mutex_try()] </li>
  2726  //   <li>  [sqlite3_mutex_leave()] </li>
  2727  //   <li>  [sqlite3_mutex_held()] </li>
  2728  //   <li>  [sqlite3_mutex_notheld()] </li>
  2729  // </ul>)^
  2730  //
  2731  // The only difference is that the public sqlite3_XXX functions enumerated
  2732  // above silently ignore any invocations that pass a NULL pointer instead
  2733  // of a valid mutex handle. The implementations of the methods defined
  2734  // by this structure are not required to handle this case. The results
  2735  // of passing a NULL pointer instead of a valid mutex handle are undefined
  2736  // (i.e. it is acceptable to provide an implementation that segfaults if
  2737  // it is passed a NULL pointer).
  2738  //
  2739  // The xMutexInit() method must be threadsafe.  It must be harmless to
  2740  // invoke xMutexInit() multiple times within the same process and without
  2741  // intervening calls to xMutexEnd().  Second and subsequent calls to
  2742  // xMutexInit() must be no-ops.
  2743  //
  2744  // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
  2745  // and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
  2746  // allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
  2747  // memory allocation for a fast or recursive mutex.
  2748  //
  2749  // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
  2750  // called, but only if the prior call to xMutexInit returned SQLITE_OK.
  2751  // If xMutexInit fails in any way, it is expected to clean up after itself
  2752  // prior to returning.
  2753  type sqlite3_mutex_methods1 = struct {
  2754  	xMutexInit    uintptr
  2755  	xMutexEnd     uintptr
  2756  	xMutexAlloc   uintptr
  2757  	xMutexFree    uintptr
  2758  	xMutexEnter   uintptr
  2759  	xMutexTry     uintptr
  2760  	xMutexLeave   uintptr
  2761  	xMutexHeld    uintptr
  2762  	xMutexNotheld uintptr
  2763  } /* sqlite3.h:7589:9 */
  2764  
  2765  // CAPI3REF: Mutex Methods Object
  2766  //
  2767  // An instance of this structure defines the low-level routines
  2768  // used to allocate and use mutexes.
  2769  //
  2770  // Usually, the default mutex implementations provided by SQLite are
  2771  // sufficient, however the application has the option of substituting a custom
  2772  // implementation for specialized deployments or systems for which SQLite
  2773  // does not provide a suitable implementation. In this case, the application
  2774  // creates and populates an instance of this structure to pass
  2775  // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
  2776  // Additionally, an instance of this structure can be used as an
  2777  // output variable when querying the system for the current mutex
  2778  // implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
  2779  //
  2780  // ^The xMutexInit method defined by this structure is invoked as
  2781  // part of system initialization by the sqlite3_initialize() function.
  2782  // ^The xMutexInit routine is called by SQLite exactly once for each
  2783  // effective call to [sqlite3_initialize()].
  2784  //
  2785  // ^The xMutexEnd method defined by this structure is invoked as
  2786  // part of system shutdown by the sqlite3_shutdown() function. The
  2787  // implementation of this method is expected to release all outstanding
  2788  // resources obtained by the mutex methods implementation, especially
  2789  // those obtained by the xMutexInit method.  ^The xMutexEnd()
  2790  // interface is invoked exactly once for each call to [sqlite3_shutdown()].
  2791  //
  2792  // ^(The remaining seven methods defined by this structure (xMutexAlloc,
  2793  // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
  2794  // xMutexNotheld) implement the following interfaces (respectively):
  2795  //
  2796  // <ul>
  2797  //   <li>  [sqlite3_mutex_alloc()] </li>
  2798  //   <li>  [sqlite3_mutex_free()] </li>
  2799  //   <li>  [sqlite3_mutex_enter()] </li>
  2800  //   <li>  [sqlite3_mutex_try()] </li>
  2801  //   <li>  [sqlite3_mutex_leave()] </li>
  2802  //   <li>  [sqlite3_mutex_held()] </li>
  2803  //   <li>  [sqlite3_mutex_notheld()] </li>
  2804  // </ul>)^
  2805  //
  2806  // The only difference is that the public sqlite3_XXX functions enumerated
  2807  // above silently ignore any invocations that pass a NULL pointer instead
  2808  // of a valid mutex handle. The implementations of the methods defined
  2809  // by this structure are not required to handle this case. The results
  2810  // of passing a NULL pointer instead of a valid mutex handle are undefined
  2811  // (i.e. it is acceptable to provide an implementation that segfaults if
  2812  // it is passed a NULL pointer).
  2813  //
  2814  // The xMutexInit() method must be threadsafe.  It must be harmless to
  2815  // invoke xMutexInit() multiple times within the same process and without
  2816  // intervening calls to xMutexEnd().  Second and subsequent calls to
  2817  // xMutexInit() must be no-ops.
  2818  //
  2819  // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
  2820  // and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
  2821  // allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
  2822  // memory allocation for a fast or recursive mutex.
  2823  //
  2824  // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
  2825  // called, but only if the prior call to xMutexInit returned SQLITE_OK.
  2826  // If xMutexInit fails in any way, it is expected to clean up after itself
  2827  // prior to returning.
  2828  type sqlite3_mutex_methods = sqlite3_mutex_methods1 /* sqlite3.h:7589:38 */
  2829  
  2830  // CAPI3REF: Custom Page Cache Object
  2831  //
  2832  // The sqlite3_pcache_page object represents a single page in the
  2833  // page cache.  The page cache will allocate instances of this
  2834  // object.  Various methods of the page cache use pointers to instances
  2835  // of this object as parameters or as their return value.
  2836  //
  2837  // See [sqlite3_pcache_methods2] for additional information.
  2838  type sqlite3_pcache_page1 = struct {
  2839  	pBuf   uintptr
  2840  	pExtra uintptr
  2841  } /* sqlite3.h:8344:9 */
  2842  
  2843  // CAPI3REF: Custom Page Cache Object
  2844  //
  2845  // The sqlite3_pcache_page object represents a single page in the
  2846  // page cache.  The page cache will allocate instances of this
  2847  // object.  Various methods of the page cache use pointers to instances
  2848  // of this object as parameters or as their return value.
  2849  //
  2850  // See [sqlite3_pcache_methods2] for additional information.
  2851  type sqlite3_pcache_page = sqlite3_pcache_page1 /* sqlite3.h:8344:36 */
  2852  
  2853  // CAPI3REF: Application Defined Page Cache.
  2854  // KEYWORDS: {page cache}
  2855  //
  2856  // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can
  2857  // register an alternative page cache implementation by passing in an
  2858  // instance of the sqlite3_pcache_methods2 structure.)^
  2859  // In many applications, most of the heap memory allocated by
  2860  // SQLite is used for the page cache.
  2861  // By implementing a
  2862  // custom page cache using this API, an application can better control
  2863  // the amount of memory consumed by SQLite, the way in which
  2864  // that memory is allocated and released, and the policies used to
  2865  // determine exactly which parts of a database file are cached and for
  2866  // how long.
  2867  //
  2868  // The alternative page cache mechanism is an
  2869  // extreme measure that is only needed by the most demanding applications.
  2870  // The built-in page cache is recommended for most uses.
  2871  //
  2872  // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an
  2873  // internal buffer by SQLite within the call to [sqlite3_config].  Hence
  2874  // the application may discard the parameter after the call to
  2875  // [sqlite3_config()] returns.)^
  2876  //
  2877  // [[the xInit() page cache method]]
  2878  // ^(The xInit() method is called once for each effective
  2879  // call to [sqlite3_initialize()])^
  2880  // (usually only once during the lifetime of the process). ^(The xInit()
  2881  // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^
  2882  // The intent of the xInit() method is to set up global data structures
  2883  // required by the custom page cache implementation.
  2884  // ^(If the xInit() method is NULL, then the
  2885  // built-in default page cache is used instead of the application defined
  2886  // page cache.)^
  2887  //
  2888  // [[the xShutdown() page cache method]]
  2889  // ^The xShutdown() method is called by [sqlite3_shutdown()].
  2890  // It can be used to clean up
  2891  // any outstanding resources before process shutdown, if required.
  2892  // ^The xShutdown() method may be NULL.
  2893  //
  2894  // ^SQLite automatically serializes calls to the xInit method,
  2895  // so the xInit method need not be threadsafe.  ^The
  2896  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  2897  // not need to be threadsafe either.  All other methods must be threadsafe
  2898  // in multithreaded applications.
  2899  //
  2900  // ^SQLite will never invoke xInit() more than once without an intervening
  2901  // call to xShutdown().
  2902  //
  2903  // [[the xCreate() page cache methods]]
  2904  // ^SQLite invokes the xCreate() method to construct a new cache instance.
  2905  // SQLite will typically create one cache instance for each open database file,
  2906  // though this is not guaranteed. ^The
  2907  // first parameter, szPage, is the size in bytes of the pages that must
  2908  // be allocated by the cache.  ^szPage will always a power of two.  ^The
  2909  // second parameter szExtra is a number of bytes of extra storage
  2910  // associated with each page cache entry.  ^The szExtra parameter will
  2911  // a number less than 250.  SQLite will use the
  2912  // extra szExtra bytes on each page to store metadata about the underlying
  2913  // database page on disk.  The value passed into szExtra depends
  2914  // on the SQLite version, the target platform, and how SQLite was compiled.
  2915  // ^The third argument to xCreate(), bPurgeable, is true if the cache being
  2916  // created will be used to cache database pages of a file stored on disk, or
  2917  // false if it is used for an in-memory database. The cache implementation
  2918  // does not have to do anything special based with the value of bPurgeable;
  2919  // it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
  2920  // never invoke xUnpin() except to deliberately delete a page.
  2921  // ^In other words, calls to xUnpin() on a cache with bPurgeable set to
  2922  // false will always have the "discard" flag set to true.
  2923  // ^Hence, a cache created with bPurgeable false will
  2924  // never contain any unpinned pages.
  2925  //
  2926  // [[the xCachesize() page cache method]]
  2927  // ^(The xCachesize() method may be called at any time by SQLite to set the
  2928  // suggested maximum cache-size (number of pages stored by) the cache
  2929  // instance passed as the first argument. This is the value configured using
  2930  // the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
  2931  // parameter, the implementation is not required to do anything with this
  2932  // value; it is advisory only.
  2933  //
  2934  // [[the xPagecount() page cache methods]]
  2935  // The xPagecount() method must return the number of pages currently
  2936  // stored in the cache, both pinned and unpinned.
  2937  //
  2938  // [[the xFetch() page cache methods]]
  2939  // The xFetch() method locates a page in the cache and returns a pointer to
  2940  // an sqlite3_pcache_page object associated with that page, or a NULL pointer.
  2941  // The pBuf element of the returned sqlite3_pcache_page object will be a
  2942  // pointer to a buffer of szPage bytes used to store the content of a
  2943  // single database page.  The pExtra element of sqlite3_pcache_page will be
  2944  // a pointer to the szExtra bytes of extra storage that SQLite has requested
  2945  // for each entry in the page cache.
  2946  //
  2947  // The page to be fetched is determined by the key. ^The minimum key value
  2948  // is 1.  After it has been retrieved using xFetch, the page is considered
  2949  // to be "pinned".
  2950  //
  2951  // If the requested page is already in the page cache, then the page cache
  2952  // implementation must return a pointer to the page buffer with its content
  2953  // intact.  If the requested page is not already in the cache, then the
  2954  // cache implementation should use the value of the createFlag
  2955  // parameter to help it determined what action to take:
  2956  //
  2957  // <table border=1 width=85% align=center>
  2958  // <tr><th> createFlag <th> Behavior when page is not already in cache
  2959  // <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
  2960  // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
  2961  //                 Otherwise return NULL.
  2962  // <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
  2963  //                 NULL if allocating a new page is effectively impossible.
  2964  // </table>
  2965  //
  2966  // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
  2967  // will only use a createFlag of 2 after a prior call with a createFlag of 1
  2968  // failed.)^  In between the xFetch() calls, SQLite may
  2969  // attempt to unpin one or more cache pages by spilling the content of
  2970  // pinned pages to disk and synching the operating system disk cache.
  2971  //
  2972  // [[the xUnpin() page cache method]]
  2973  // ^xUnpin() is called by SQLite with a pointer to a currently pinned page
  2974  // as its second argument.  If the third parameter, discard, is non-zero,
  2975  // then the page must be evicted from the cache.
  2976  // ^If the discard parameter is
  2977  // zero, then the page may be discarded or retained at the discretion of
  2978  // page cache implementation. ^The page cache implementation
  2979  // may choose to evict unpinned pages at any time.
  2980  //
  2981  // The cache must not perform any reference counting. A single
  2982  // call to xUnpin() unpins the page regardless of the number of prior calls
  2983  // to xFetch().
  2984  //
  2985  // [[the xRekey() page cache methods]]
  2986  // The xRekey() method is used to change the key value associated with the
  2987  // page passed as the second argument. If the cache
  2988  // previously contains an entry associated with newKey, it must be
  2989  // discarded. ^Any prior cache entry associated with newKey is guaranteed not
  2990  // to be pinned.
  2991  //
  2992  // When SQLite calls the xTruncate() method, the cache must discard all
  2993  // existing cache entries with page numbers (keys) greater than or equal
  2994  // to the value of the iLimit parameter passed to xTruncate(). If any
  2995  // of these pages are pinned, they are implicitly unpinned, meaning that
  2996  // they can be safely discarded.
  2997  //
  2998  // [[the xDestroy() page cache method]]
  2999  // ^The xDestroy() method is used to delete a cache allocated by xCreate().
  3000  // All resources associated with the specified cache should be freed. ^After
  3001  // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
  3002  // handle invalid, and will not use it with any other sqlite3_pcache_methods2
  3003  // functions.
  3004  //
  3005  // [[the xShrink() page cache method]]
  3006  // ^SQLite invokes the xShrink() method when it wants the page cache to
  3007  // free up as much of heap memory as possible.  The page cache implementation
  3008  // is not obligated to free any memory, but well-behaved implementations should
  3009  // do their best.
  3010  type sqlite3_pcache_methods21 = struct {
  3011  	iVersion   int32
  3012  	_          [4]byte
  3013  	pArg       uintptr
  3014  	xInit      uintptr
  3015  	xShutdown  uintptr
  3016  	xCreate    uintptr
  3017  	xCachesize uintptr
  3018  	xPagecount uintptr
  3019  	xFetch     uintptr
  3020  	xUnpin     uintptr
  3021  	xRekey     uintptr
  3022  	xTruncate  uintptr
  3023  	xDestroy   uintptr
  3024  	xShrink    uintptr
  3025  } /* sqlite3.h:8509:9 */
  3026  
  3027  // CAPI3REF: Application Defined Page Cache.
  3028  // KEYWORDS: {page cache}
  3029  //
  3030  // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can
  3031  // register an alternative page cache implementation by passing in an
  3032  // instance of the sqlite3_pcache_methods2 structure.)^
  3033  // In many applications, most of the heap memory allocated by
  3034  // SQLite is used for the page cache.
  3035  // By implementing a
  3036  // custom page cache using this API, an application can better control
  3037  // the amount of memory consumed by SQLite, the way in which
  3038  // that memory is allocated and released, and the policies used to
  3039  // determine exactly which parts of a database file are cached and for
  3040  // how long.
  3041  //
  3042  // The alternative page cache mechanism is an
  3043  // extreme measure that is only needed by the most demanding applications.
  3044  // The built-in page cache is recommended for most uses.
  3045  //
  3046  // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an
  3047  // internal buffer by SQLite within the call to [sqlite3_config].  Hence
  3048  // the application may discard the parameter after the call to
  3049  // [sqlite3_config()] returns.)^
  3050  //
  3051  // [[the xInit() page cache method]]
  3052  // ^(The xInit() method is called once for each effective
  3053  // call to [sqlite3_initialize()])^
  3054  // (usually only once during the lifetime of the process). ^(The xInit()
  3055  // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^
  3056  // The intent of the xInit() method is to set up global data structures
  3057  // required by the custom page cache implementation.
  3058  // ^(If the xInit() method is NULL, then the
  3059  // built-in default page cache is used instead of the application defined
  3060  // page cache.)^
  3061  //
  3062  // [[the xShutdown() page cache method]]
  3063  // ^The xShutdown() method is called by [sqlite3_shutdown()].
  3064  // It can be used to clean up
  3065  // any outstanding resources before process shutdown, if required.
  3066  // ^The xShutdown() method may be NULL.
  3067  //
  3068  // ^SQLite automatically serializes calls to the xInit method,
  3069  // so the xInit method need not be threadsafe.  ^The
  3070  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  3071  // not need to be threadsafe either.  All other methods must be threadsafe
  3072  // in multithreaded applications.
  3073  //
  3074  // ^SQLite will never invoke xInit() more than once without an intervening
  3075  // call to xShutdown().
  3076  //
  3077  // [[the xCreate() page cache methods]]
  3078  // ^SQLite invokes the xCreate() method to construct a new cache instance.
  3079  // SQLite will typically create one cache instance for each open database file,
  3080  // though this is not guaranteed. ^The
  3081  // first parameter, szPage, is the size in bytes of the pages that must
  3082  // be allocated by the cache.  ^szPage will always a power of two.  ^The
  3083  // second parameter szExtra is a number of bytes of extra storage
  3084  // associated with each page cache entry.  ^The szExtra parameter will
  3085  // a number less than 250.  SQLite will use the
  3086  // extra szExtra bytes on each page to store metadata about the underlying
  3087  // database page on disk.  The value passed into szExtra depends
  3088  // on the SQLite version, the target platform, and how SQLite was compiled.
  3089  // ^The third argument to xCreate(), bPurgeable, is true if the cache being
  3090  // created will be used to cache database pages of a file stored on disk, or
  3091  // false if it is used for an in-memory database. The cache implementation
  3092  // does not have to do anything special based with the value of bPurgeable;
  3093  // it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
  3094  // never invoke xUnpin() except to deliberately delete a page.
  3095  // ^In other words, calls to xUnpin() on a cache with bPurgeable set to
  3096  // false will always have the "discard" flag set to true.
  3097  // ^Hence, a cache created with bPurgeable false will
  3098  // never contain any unpinned pages.
  3099  //
  3100  // [[the xCachesize() page cache method]]
  3101  // ^(The xCachesize() method may be called at any time by SQLite to set the
  3102  // suggested maximum cache-size (number of pages stored by) the cache
  3103  // instance passed as the first argument. This is the value configured using
  3104  // the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
  3105  // parameter, the implementation is not required to do anything with this
  3106  // value; it is advisory only.
  3107  //
  3108  // [[the xPagecount() page cache methods]]
  3109  // The xPagecount() method must return the number of pages currently
  3110  // stored in the cache, both pinned and unpinned.
  3111  //
  3112  // [[the xFetch() page cache methods]]
  3113  // The xFetch() method locates a page in the cache and returns a pointer to
  3114  // an sqlite3_pcache_page object associated with that page, or a NULL pointer.
  3115  // The pBuf element of the returned sqlite3_pcache_page object will be a
  3116  // pointer to a buffer of szPage bytes used to store the content of a
  3117  // single database page.  The pExtra element of sqlite3_pcache_page will be
  3118  // a pointer to the szExtra bytes of extra storage that SQLite has requested
  3119  // for each entry in the page cache.
  3120  //
  3121  // The page to be fetched is determined by the key. ^The minimum key value
  3122  // is 1.  After it has been retrieved using xFetch, the page is considered
  3123  // to be "pinned".
  3124  //
  3125  // If the requested page is already in the page cache, then the page cache
  3126  // implementation must return a pointer to the page buffer with its content
  3127  // intact.  If the requested page is not already in the cache, then the
  3128  // cache implementation should use the value of the createFlag
  3129  // parameter to help it determined what action to take:
  3130  //
  3131  // <table border=1 width=85% align=center>
  3132  // <tr><th> createFlag <th> Behavior when page is not already in cache
  3133  // <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
  3134  // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
  3135  //                 Otherwise return NULL.
  3136  // <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
  3137  //                 NULL if allocating a new page is effectively impossible.
  3138  // </table>
  3139  //
  3140  // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
  3141  // will only use a createFlag of 2 after a prior call with a createFlag of 1
  3142  // failed.)^  In between the xFetch() calls, SQLite may
  3143  // attempt to unpin one or more cache pages by spilling the content of
  3144  // pinned pages to disk and synching the operating system disk cache.
  3145  //
  3146  // [[the xUnpin() page cache method]]
  3147  // ^xUnpin() is called by SQLite with a pointer to a currently pinned page
  3148  // as its second argument.  If the third parameter, discard, is non-zero,
  3149  // then the page must be evicted from the cache.
  3150  // ^If the discard parameter is
  3151  // zero, then the page may be discarded or retained at the discretion of
  3152  // page cache implementation. ^The page cache implementation
  3153  // may choose to evict unpinned pages at any time.
  3154  //
  3155  // The cache must not perform any reference counting. A single
  3156  // call to xUnpin() unpins the page regardless of the number of prior calls
  3157  // to xFetch().
  3158  //
  3159  // [[the xRekey() page cache methods]]
  3160  // The xRekey() method is used to change the key value associated with the
  3161  // page passed as the second argument. If the cache
  3162  // previously contains an entry associated with newKey, it must be
  3163  // discarded. ^Any prior cache entry associated with newKey is guaranteed not
  3164  // to be pinned.
  3165  //
  3166  // When SQLite calls the xTruncate() method, the cache must discard all
  3167  // existing cache entries with page numbers (keys) greater than or equal
  3168  // to the value of the iLimit parameter passed to xTruncate(). If any
  3169  // of these pages are pinned, they are implicitly unpinned, meaning that
  3170  // they can be safely discarded.
  3171  //
  3172  // [[the xDestroy() page cache method]]
  3173  // ^The xDestroy() method is used to delete a cache allocated by xCreate().
  3174  // All resources associated with the specified cache should be freed. ^After
  3175  // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
  3176  // handle invalid, and will not use it with any other sqlite3_pcache_methods2
  3177  // functions.
  3178  //
  3179  // [[the xShrink() page cache method]]
  3180  // ^SQLite invokes the xShrink() method when it wants the page cache to
  3181  // free up as much of heap memory as possible.  The page cache implementation
  3182  // is not obligated to free any memory, but well-behaved implementations should
  3183  // do their best.
  3184  type sqlite3_pcache_methods2 = sqlite3_pcache_methods21 /* sqlite3.h:8509:40 */
  3185  
  3186  // This is the obsolete pcache_methods object that has now been replaced
  3187  // by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is
  3188  // retained in the header file for backwards compatibility only.
  3189  type sqlite3_pcache_methods1 = struct {
  3190  	pArg       uintptr
  3191  	xInit      uintptr
  3192  	xShutdown  uintptr
  3193  	xCreate    uintptr
  3194  	xCachesize uintptr
  3195  	xPagecount uintptr
  3196  	xFetch     uintptr
  3197  	xUnpin     uintptr
  3198  	xRekey     uintptr
  3199  	xTruncate  uintptr
  3200  	xDestroy   uintptr
  3201  } /* sqlite3.h:8532:9 */
  3202  
  3203  // This is the obsolete pcache_methods object that has now been replaced
  3204  // by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is
  3205  // retained in the header file for backwards compatibility only.
  3206  type sqlite3_pcache_methods = sqlite3_pcache_methods1 /* sqlite3.h:8532:39 */
  3207  
  3208  // CAPI3REF: Database Snapshot
  3209  // KEYWORDS: {snapshot} {sqlite3_snapshot}
  3210  //
  3211  // An instance of the snapshot object records the state of a [WAL mode]
  3212  // database for some specific point in history.
  3213  //
  3214  // In [WAL mode], multiple [database connections] that are open on the
  3215  // same database file can each be reading a different historical version
  3216  // of the database file.  When a [database connection] begins a read
  3217  // transaction, that connection sees an unchanging copy of the database
  3218  // as it existed for the point in time when the transaction first started.
  3219  // Subsequent changes to the database from other connections are not seen
  3220  // by the reader until a new read transaction is started.
  3221  //
  3222  // The sqlite3_snapshot object records state information about an historical
  3223  // version of the database file so that it is possible to later open a new read
  3224  // transaction that sees that historical version of the database rather than
  3225  // the most recent version.
  3226  type sqlite3_snapshot1 = struct{ hidden [48]uint8 } /* sqlite3.h:9589:9 */
  3227  
  3228  // CAPI3REF: Database Snapshot
  3229  // KEYWORDS: {snapshot} {sqlite3_snapshot}
  3230  //
  3231  // An instance of the snapshot object records the state of a [WAL mode]
  3232  // database for some specific point in history.
  3233  //
  3234  // In [WAL mode], multiple [database connections] that are open on the
  3235  // same database file can each be reading a different historical version
  3236  // of the database file.  When a [database connection] begins a read
  3237  // transaction, that connection sees an unchanging copy of the database
  3238  // as it existed for the point in time when the transaction first started.
  3239  // Subsequent changes to the database from other connections are not seen
  3240  // by the reader until a new read transaction is started.
  3241  //
  3242  // The sqlite3_snapshot object records state information about an historical
  3243  // version of the database file so that it is possible to later open a new read
  3244  // transaction that sees that historical version of the database rather than
  3245  // the most recent version.
  3246  type sqlite3_snapshot = sqlite3_snapshot1 /* sqlite3.h:9591:3 */
  3247  
  3248  // CAPI3REF: Flags for sqlite3_deserialize()
  3249  //
  3250  // The following are allowed values for 6th argument (the F argument) to
  3251  // the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
  3252  //
  3253  // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
  3254  // in the P argument is held in memory obtained from [sqlite3_malloc64()]
  3255  // and that SQLite should take ownership of this memory and automatically
  3256  // free it when it has finished using it.  Without this flag, the caller
  3257  // is responsible for freeing any dynamically allocated memory.
  3258  //
  3259  // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to
  3260  // grow the size of the database using calls to [sqlite3_realloc64()].  This
  3261  // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.
  3262  // Without this flag, the deserialized database cannot increase in size beyond
  3263  // the number of bytes specified by the M parameter.
  3264  //
  3265  // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database
  3266  // should be treated as read-only.
  3267  
  3268  // Undo the hack that converts floating point types to integer for
  3269  // builds on processors without floating point support.
  3270  
  3271  //******* Begin file sqlite3rtree.h ********
  3272  // 2010 August 30
  3273  //
  3274  // The author disclaims copyright to this source code.  In place of
  3275  // a legal notice, here is a blessing:
  3276  //
  3277  //    May you do good and not evil.
  3278  //    May you find forgiveness for yourself and forgive others.
  3279  //    May you share freely, never taking more than you give.
  3280  //
  3281  //
  3282  
  3283  type sqlite3_rtree_geometry1 = struct {
  3284  	pContext uintptr
  3285  	nParam   int32
  3286  	_        [4]byte
  3287  	aParam   uintptr
  3288  	pUser    uintptr
  3289  	xDelUser uintptr
  3290  } /* sqlite3.h:9916:9 */
  3291  
  3292  // CAPI3REF: Flags for sqlite3_deserialize()
  3293  //
  3294  // The following are allowed values for 6th argument (the F argument) to
  3295  // the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
  3296  //
  3297  // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
  3298  // in the P argument is held in memory obtained from [sqlite3_malloc64()]
  3299  // and that SQLite should take ownership of this memory and automatically
  3300  // free it when it has finished using it.  Without this flag, the caller
  3301  // is responsible for freeing any dynamically allocated memory.
  3302  //
  3303  // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to
  3304  // grow the size of the database using calls to [sqlite3_realloc64()].  This
  3305  // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.
  3306  // Without this flag, the deserialized database cannot increase in size beyond
  3307  // the number of bytes specified by the M parameter.
  3308  //
  3309  // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database
  3310  // should be treated as read-only.
  3311  
  3312  // Undo the hack that converts floating point types to integer for
  3313  // builds on processors without floating point support.
  3314  
  3315  //******* Begin file sqlite3rtree.h ********
  3316  // 2010 August 30
  3317  //
  3318  // The author disclaims copyright to this source code.  In place of
  3319  // a legal notice, here is a blessing:
  3320  //
  3321  //    May you do good and not evil.
  3322  //    May you find forgiveness for yourself and forgive others.
  3323  //    May you share freely, never taking more than you give.
  3324  //
  3325  //
  3326  
  3327  type sqlite3_rtree_geometry = sqlite3_rtree_geometry1 /* sqlite3.h:9916:39 */
  3328  type sqlite3_rtree_query_info1 = struct {
  3329  	pContext      uintptr
  3330  	nParam        int32
  3331  	_             [4]byte
  3332  	aParam        uintptr
  3333  	pUser         uintptr
  3334  	xDelUser      uintptr
  3335  	aCoord        uintptr
  3336  	anQueue       uintptr
  3337  	nCoord        int32
  3338  	iLevel        int32
  3339  	mxLevel       int32
  3340  	_             [4]byte
  3341  	iRowid        sqlite3_int64
  3342  	rParentScore  sqlite3_rtree_dbl
  3343  	eParentWithin int32
  3344  	eWithin       int32
  3345  	rScore        sqlite3_rtree_dbl
  3346  	apSqlParam    uintptr
  3347  } /* sqlite3.h:9917:9 */
  3348  
  3349  type sqlite3_rtree_query_info = sqlite3_rtree_query_info1 /* sqlite3.h:9917:41 */
  3350  
  3351  // The double-precision datatype used by RTree depends on the
  3352  // SQLITE_RTREE_INT_ONLY compile-time option.
  3353  type sqlite3_rtree_dbl = float64 /* sqlite3.h:9925:18 */
  3354  
  3355  // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
  3356  
  3357  //******* End of sqlite3rtree.h ********
  3358  //******* Begin file sqlite3session.h ********
  3359  
  3360  //******* End of sqlite3session.h ********
  3361  //******* Begin file fts5.h ********
  3362  // 2014 May 31
  3363  //
  3364  // The author disclaims copyright to this source code.  In place of
  3365  // a legal notice, here is a blessing:
  3366  //
  3367  //    May you do good and not evil.
  3368  //    May you find forgiveness for yourself and forgive others.
  3369  //    May you share freely, never taking more than you give.
  3370  //
  3371  //
  3372  //
  3373  // Interfaces to extend FTS5. Using the interfaces defined in this file,
  3374  // FTS5 may be extended with:
  3375  //
  3376  //     * custom tokenizers, and
  3377  //     * custom auxiliary functions.
  3378  
  3379  // ************************************************************************
  3380  //
  3381  // CUSTOM AUXILIARY FUNCTIONS
  3382  //
  3383  // Virtual table implementations may overload SQL functions by implementing
  3384  // the sqlite3_module.xFindFunction() method.
  3385  
  3386  type Fts5ExtensionApi1 = struct {
  3387  	iVersion           int32
  3388  	_                  [4]byte
  3389  	xUserData          uintptr
  3390  	xColumnCount       uintptr
  3391  	xRowCount          uintptr
  3392  	xColumnTotalSize   uintptr
  3393  	xTokenize          uintptr
  3394  	xPhraseCount       uintptr
  3395  	xPhraseSize        uintptr
  3396  	xInstCount         uintptr
  3397  	xInst              uintptr
  3398  	xRowid             uintptr
  3399  	xColumnText        uintptr
  3400  	xColumnSize        uintptr
  3401  	xQueryPhrase       uintptr
  3402  	xSetAuxdata        uintptr
  3403  	xGetAuxdata        uintptr
  3404  	xPhraseFirst       uintptr
  3405  	xPhraseNext        uintptr
  3406  	xPhraseFirstColumn uintptr
  3407  	xPhraseNextColumn  uintptr
  3408  } /* sqlite3.h:11724:9 */
  3409  
  3410  // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
  3411  
  3412  //******* End of sqlite3rtree.h ********
  3413  //******* Begin file sqlite3session.h ********
  3414  
  3415  //******* End of sqlite3session.h ********
  3416  //******* Begin file fts5.h ********
  3417  // 2014 May 31
  3418  //
  3419  // The author disclaims copyright to this source code.  In place of
  3420  // a legal notice, here is a blessing:
  3421  //
  3422  //    May you do good and not evil.
  3423  //    May you find forgiveness for yourself and forgive others.
  3424  //    May you share freely, never taking more than you give.
  3425  //
  3426  //
  3427  //
  3428  // Interfaces to extend FTS5. Using the interfaces defined in this file,
  3429  // FTS5 may be extended with:
  3430  //
  3431  //     * custom tokenizers, and
  3432  //     * custom auxiliary functions.
  3433  
  3434  // ************************************************************************
  3435  //
  3436  // CUSTOM AUXILIARY FUNCTIONS
  3437  //
  3438  // Virtual table implementations may overload SQL functions by implementing
  3439  // the sqlite3_module.xFindFunction() method.
  3440  
  3441  type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.h:11724:33 */
  3442  type Fts5PhraseIter1 = struct {
  3443  	a uintptr
  3444  	b uintptr
  3445  } /* sqlite3.h:11726:9 */
  3446  
  3447  type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.h:11726:31 */
  3448  
  3449  type fts5_extension_function = uintptr /* sqlite3.h:11728:14 */
  3450  type fts5_tokenizer1 = struct {
  3451  	xCreate   uintptr
  3452  	xDelete   uintptr
  3453  	xTokenize uintptr
  3454  } /* sqlite3.h:12187:9 */
  3455  
  3456  type fts5_tokenizer = fts5_tokenizer1 /* sqlite3.h:12187:31 */
  3457  
  3458  // Flags that may be passed as the third argument to xTokenize()
  3459  
  3460  // Flags that may be passed by the tokenizer implementation back to FTS5
  3461  // as the third argument to the supplied xToken callback.
  3462  
  3463  //
  3464  // END OF CUSTOM TOKENIZERS
  3465  //
  3466  
  3467  // ************************************************************************
  3468  //
  3469  // FTS5 EXTENSION REGISTRATION API
  3470  type fts5_api1 = struct {
  3471  	iVersion         int32
  3472  	_                [4]byte
  3473  	xCreateTokenizer uintptr
  3474  	xFindTokenizer   uintptr
  3475  	xCreateFunction  uintptr
  3476  } /* sqlite3.h:12223:9 */
  3477  
  3478  // Flags that may be passed as the third argument to xTokenize()
  3479  
  3480  // Flags that may be passed by the tokenizer implementation back to FTS5
  3481  // as the third argument to the supplied xToken callback.
  3482  
  3483  //
  3484  // END OF CUSTOM TOKENIZERS
  3485  //
  3486  
  3487  // ************************************************************************
  3488  //
  3489  // FTS5 EXTENSION REGISTRATION API
  3490  type fts5_api = fts5_api1 /* sqlite3.h:12223:25 */
  3491  
  3492  // The tag name of this struct is _G_fpos_t to preserve historic
  3493  //    C++ mangled names for functions taking fpos_t arguments.
  3494  //    That name should not be used in new code.
  3495  type _G_fpos_t = struct {
  3496  	__pos   int64
  3497  	__state struct {
  3498  		__count int32
  3499  		__value struct{ __wch uint32 }
  3500  	}
  3501  } /* __fpos_t.h:10:9 */
  3502  
  3503  // bits/types.h -- definitions of __*_t types underlying *_t types.
  3504  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  3505  //    This file is part of the GNU C Library.
  3506  //
  3507  //    The GNU C Library is free software; you can redistribute it and/or
  3508  //    modify it under the terms of the GNU Lesser General Public
  3509  //    License as published by the Free Software Foundation; either
  3510  //    version 2.1 of the License, or (at your option) any later version.
  3511  //
  3512  //    The GNU C Library is distributed in the hope that it will be useful,
  3513  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3514  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3515  //    Lesser General Public License for more details.
  3516  //
  3517  //    You should have received a copy of the GNU Lesser General Public
  3518  //    License along with the GNU C Library; if not, see
  3519  //    <http://www.gnu.org/licenses/>.
  3520  
  3521  // Never include this file directly; use <sys/types.h> instead.
  3522  
  3523  // The tag name of this struct is _G_fpos64_t to preserve historic
  3524  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  3525  //    arguments.  That name should not be used in new code.
  3526  type _G_fpos64_t = struct {
  3527  	__pos   int64
  3528  	__state struct {
  3529  		__count int32
  3530  		__value struct{ __wch uint32 }
  3531  	}
  3532  } /* __fpos64_t.h:10:9 */
  3533  
  3534  type _IO_FILE = struct {
  3535  	_flags          int32
  3536  	_               [4]byte
  3537  	_IO_read_ptr    uintptr
  3538  	_IO_read_end    uintptr
  3539  	_IO_read_base   uintptr
  3540  	_IO_write_base  uintptr
  3541  	_IO_write_ptr   uintptr
  3542  	_IO_write_end   uintptr
  3543  	_IO_buf_base    uintptr
  3544  	_IO_buf_end     uintptr
  3545  	_IO_save_base   uintptr
  3546  	_IO_backup_base uintptr
  3547  	_IO_save_end    uintptr
  3548  	_markers        uintptr
  3549  	_chain          uintptr
  3550  	_fileno         int32
  3551  	_flags2         int32
  3552  	_old_offset     int64
  3553  	_cur_column     uint16
  3554  	_vtable_offset  int8
  3555  	_shortbuf       [1]int8
  3556  	_               [4]byte
  3557  	_lock           uintptr
  3558  	_offset         int64
  3559  	_codecvt        uintptr
  3560  	_wide_data      uintptr
  3561  	_freeres_list   uintptr
  3562  	_freeres_buf    uintptr
  3563  	__pad5          size_t
  3564  	_mode           int32
  3565  	_unused2        [20]int8
  3566  } /* __FILE.h:4:1 */
  3567  
  3568  // The opaque type of streams.  This is the definition used elsewhere.
  3569  type FILE = _IO_FILE /* FILE.h:7:25 */
  3570  
  3571  // These macros are used by bits/stdio.h and internal headers.
  3572  
  3573  // Many more flag bits are defined internally.
  3574  
  3575  type off_t = int64 /* stdio.h:65:19 */
  3576  
  3577  type ssize_t = int64 /* stdio.h:77:19 */
  3578  
  3579  // The type of the second argument to `fgetpos' and `fsetpos'.
  3580  type fpos_t = _G_fpos64_t /* stdio.h:86:20 */
  3581  
  3582  // If we are compiling with optimizing read this file.  It contains
  3583  //    several optimizing inline functions and macros.
  3584  
  3585  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  3586  //    This file is part of the GNU C Library.
  3587  //
  3588  //    The GNU C Library is free software; you can redistribute it and/or
  3589  //    modify it under the terms of the GNU Lesser General Public
  3590  //    License as published by the Free Software Foundation; either
  3591  //    version 2.1 of the License, or (at your option) any later version.
  3592  //
  3593  //    The GNU C Library is distributed in the hope that it will be useful,
  3594  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3595  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3596  //    Lesser General Public License for more details.
  3597  //
  3598  //    You should have received a copy of the GNU Lesser General Public
  3599  //    License along with the GNU C Library; if not, see
  3600  //    <http://www.gnu.org/licenses/>.
  3601  
  3602  //	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
  3603  
  3604  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  3605  //    This file is part of the GNU C Library.
  3606  //
  3607  //    The GNU C Library is free software; you can redistribute it and/or
  3608  //    modify it under the terms of the GNU Lesser General Public
  3609  //    License as published by the Free Software Foundation; either
  3610  //    version 2.1 of the License, or (at your option) any later version.
  3611  //
  3612  //    The GNU C Library is distributed in the hope that it will be useful,
  3613  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3614  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3615  //    Lesser General Public License for more details.
  3616  //
  3617  //    You should have received a copy of the GNU Lesser General Public
  3618  //    License along with the GNU C Library; if not, see
  3619  //    <http://www.gnu.org/licenses/>.
  3620  
  3621  // These may be used to determine what facilities are present at compile time.
  3622  //    Their values can be obtained at run time from `sysconf'.
  3623  
  3624  // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008.
  3625  
  3626  // These are not #ifdef __USE_POSIX2 because they are
  3627  //    in the theoretically application-owned namespace.
  3628  
  3629  // The utilities on GNU systems also correspond to this version.
  3630  
  3631  // The utilities on GNU systems also correspond to this version.
  3632  
  3633  // This symbol was required until the 2001 edition of POSIX.
  3634  
  3635  // If defined, the implementation supports the
  3636  //    C Language Bindings Option.
  3637  
  3638  // If defined, the implementation supports the
  3639  //    C Language Development Utilities Option.
  3640  
  3641  // If defined, the implementation supports the
  3642  //    Software Development Utilities Option.
  3643  
  3644  // If defined, the implementation supports the
  3645  //    creation of locales with the localedef utility.
  3646  
  3647  // X/Open version number to which the library conforms.  It is selectable.
  3648  
  3649  // Commands and utilities from XPG4 are available.
  3650  
  3651  // We are compatible with the old published standards as well.
  3652  
  3653  // The X/Open Unix extensions are available.
  3654  
  3655  // The enhanced internationalization capabilities according to XPG4.2
  3656  //    are present.
  3657  
  3658  // The legacy interfaces are also available.
  3659  
  3660  // Get values of POSIX options:
  3661  //
  3662  //    If these symbols are defined, the corresponding features are
  3663  //    always available.  If not, they may be available sometimes.
  3664  //    The current values can be obtained with `sysconf'.
  3665  //
  3666  //    _POSIX_JOB_CONTROL		Job control is supported.
  3667  //    _POSIX_SAVED_IDS		Processes have a saved set-user-ID
  3668  // 				and a saved set-group-ID.
  3669  //    _POSIX_REALTIME_SIGNALS	Real-time, queued signals are supported.
  3670  //    _POSIX_PRIORITY_SCHEDULING	Priority scheduling is supported.
  3671  //    _POSIX_TIMERS		POSIX.4 clocks and timers are supported.
  3672  //    _POSIX_ASYNCHRONOUS_IO	Asynchronous I/O is supported.
  3673  //    _POSIX_PRIORITIZED_IO	Prioritized asynchronous I/O is supported.
  3674  //    _POSIX_SYNCHRONIZED_IO	Synchronizing file data is supported.
  3675  //    _POSIX_FSYNC			The fsync function is present.
  3676  //    _POSIX_MAPPED_FILES		Mapping of files to memory is supported.
  3677  //    _POSIX_MEMLOCK		Locking of all memory is supported.
  3678  //    _POSIX_MEMLOCK_RANGE		Locking of ranges of memory is supported.
  3679  //    _POSIX_MEMORY_PROTECTION	Setting of memory protections is supported.
  3680  //    _POSIX_MESSAGE_PASSING	POSIX.4 message queues are supported.
  3681  //    _POSIX_SEMAPHORES		POSIX.4 counting semaphores are supported.
  3682  //    _POSIX_SHARED_MEMORY_OBJECTS	POSIX.4 shared memory objects are supported.
  3683  //    _POSIX_THREADS		POSIX.1c pthreads are supported.
  3684  //    _POSIX_THREAD_ATTR_STACKADDR	Thread stack address attribute option supported.
  3685  //    _POSIX_THREAD_ATTR_STACKSIZE	Thread stack size attribute option supported.
  3686  //    _POSIX_THREAD_SAFE_FUNCTIONS	Thread-safe functions are supported.
  3687  //    _POSIX_THREAD_PRIORITY_SCHEDULING
  3688  // 				POSIX.1c thread execution scheduling supported.
  3689  //    _POSIX_THREAD_PRIO_INHERIT	Thread priority inheritance option supported.
  3690  //    _POSIX_THREAD_PRIO_PROTECT	Thread priority protection option supported.
  3691  //    _POSIX_THREAD_PROCESS_SHARED	Process-shared synchronization supported.
  3692  //    _POSIX_PII			Protocol-independent interfaces are supported.
  3693  //    _POSIX_PII_XTI		XTI protocol-indep. interfaces are supported.
  3694  //    _POSIX_PII_SOCKET		Socket protocol-indep. interfaces are supported.
  3695  //    _POSIX_PII_INTERNET		Internet family of protocols supported.
  3696  //    _POSIX_PII_INTERNET_STREAM	Connection-mode Internet protocol supported.
  3697  //    _POSIX_PII_INTERNET_DGRAM	Connectionless Internet protocol supported.
  3698  //    _POSIX_PII_OSI		ISO/OSI family of protocols supported.
  3699  //    _POSIX_PII_OSI_COTS		Connection-mode ISO/OSI service supported.
  3700  //    _POSIX_PII_OSI_CLTS		Connectionless ISO/OSI service supported.
  3701  //    _POSIX_POLL			Implementation supports `poll' function.
  3702  //    _POSIX_SELECT		Implementation supports `select' and `pselect'.
  3703  //
  3704  //    _XOPEN_REALTIME		X/Open realtime support is available.
  3705  //    _XOPEN_REALTIME_THREADS	X/Open realtime thread support is available.
  3706  //    _XOPEN_SHM			Shared memory interface according to XPG4.2.
  3707  //
  3708  //    _XBS5_ILP32_OFF32		Implementation provides environment with 32-bit
  3709  // 				int, long, pointer, and off_t types.
  3710  //    _XBS5_ILP32_OFFBIG		Implementation provides environment with 32-bit
  3711  // 				int, long, and pointer and off_t with at least
  3712  // 				64 bits.
  3713  //    _XBS5_LP64_OFF64		Implementation provides environment with 32-bit
  3714  // 				int, and 64-bit long, pointer, and off_t types.
  3715  //    _XBS5_LPBIG_OFFBIG		Implementation provides environment with at
  3716  // 				least 32 bits int and long, pointer, and off_t
  3717  // 				with at least 64 bits.
  3718  //
  3719  //    If any of these symbols is defined as -1, the corresponding option is not
  3720  //    true for any file.  If any is defined as other than -1, the corresponding
  3721  //    option is true for all files.  If a symbol is not defined at all, the value
  3722  //    for a specific file can be obtained from `pathconf' and `fpathconf'.
  3723  //
  3724  //    _POSIX_CHOWN_RESTRICTED	Only the super user can use `chown' to change
  3725  // 				the owner of a file.  `chown' can only be used
  3726  // 				to change the group ID of a file to a group of
  3727  // 				which the calling process is a member.
  3728  //    _POSIX_NO_TRUNC		Pathname components longer than
  3729  // 				NAME_MAX generate an error.
  3730  //    _POSIX_VDISABLE		If defined, if the value of an element of the
  3731  // 				`c_cc' member of `struct termios' is
  3732  // 				_POSIX_VDISABLE, no character will have the
  3733  // 				effect associated with that element.
  3734  //    _POSIX_SYNC_IO		Synchronous I/O may be performed.
  3735  //    _POSIX_ASYNC_IO		Asynchronous I/O may be performed.
  3736  //    _POSIX_PRIO_IO		Prioritized Asynchronous I/O may be performed.
  3737  //
  3738  //    Support for the Large File Support interface is not generally available.
  3739  //    If it is available the following constants are defined to one.
  3740  //    _LFS64_LARGEFILE		Low-level I/O supports large files.
  3741  //    _LFS64_STDIO			Standard I/O supports large files.
  3742  //
  3743  
  3744  // Define POSIX options for Linux.
  3745  //    Copyright (C) 1996-2018 Free Software Foundation, Inc.
  3746  //    This file is part of the GNU C Library.
  3747  //
  3748  //    The GNU C Library is free software; you can redistribute it and/or
  3749  //    modify it under the terms of the GNU Lesser General Public License as
  3750  //    published by the Free Software Foundation; either version 2.1 of the
  3751  //    License, or (at your option) any later version.
  3752  //
  3753  //    The GNU C Library is distributed in the hope that it will be useful,
  3754  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3755  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3756  //    Lesser General Public License for more details.
  3757  //
  3758  //    You should have received a copy of the GNU Lesser General Public
  3759  //    License along with the GNU C Library; see the file COPYING.LIB.  If
  3760  //    not, see <http://www.gnu.org/licenses/>.
  3761  
  3762  // Job control is supported.
  3763  
  3764  // Processes have a saved set-user-ID and a saved set-group-ID.
  3765  
  3766  // Priority scheduling is supported.
  3767  
  3768  // Synchronizing file data is supported.
  3769  
  3770  // The fsync function is present.
  3771  
  3772  // Mapping of files to memory is supported.
  3773  
  3774  // Locking of all memory is supported.
  3775  
  3776  // Locking of ranges of memory is supported.
  3777  
  3778  // Setting of memory protections is supported.
  3779  
  3780  // Some filesystems allow all users to change file ownership.
  3781  
  3782  // `c_cc' member of 'struct termios' structure can be disabled by
  3783  //    using the value _POSIX_VDISABLE.
  3784  
  3785  // Filenames are not silently truncated.
  3786  
  3787  // X/Open realtime support is available.
  3788  
  3789  // X/Open thread realtime support is available.
  3790  
  3791  // XPG4.2 shared memory is supported.
  3792  
  3793  // Tell we have POSIX threads.
  3794  
  3795  // We have the reentrant functions described in POSIX.
  3796  
  3797  // We provide priority scheduling for threads.
  3798  
  3799  // We support user-defined stack sizes.
  3800  
  3801  // We support user-defined stacks.
  3802  
  3803  // We support priority inheritence.
  3804  
  3805  // We support priority protection, though only for non-robust
  3806  //    mutexes.
  3807  
  3808  // We support priority inheritence for robust mutexes.
  3809  
  3810  // We do not support priority protection for robust mutexes.
  3811  
  3812  // We support POSIX.1b semaphores.
  3813  
  3814  // Real-time signals are supported.
  3815  
  3816  // We support asynchronous I/O.
  3817  // Alternative name for Unix98.
  3818  // Support for prioritization is also available.
  3819  
  3820  // The LFS support in asynchronous I/O is also available.
  3821  
  3822  // The rest of the LFS is also available.
  3823  
  3824  // POSIX shared memory objects are implemented.
  3825  
  3826  // CPU-time clocks support needs to be checked at runtime.
  3827  
  3828  // Clock support in threads must be also checked at runtime.
  3829  
  3830  // GNU libc provides regular expression handling.
  3831  
  3832  // Reader/Writer locks are available.
  3833  
  3834  // We have a POSIX shell.
  3835  
  3836  // We support the Timeouts option.
  3837  
  3838  // We support spinlocks.
  3839  
  3840  // The `spawn' function family is supported.
  3841  
  3842  // We have POSIX timers.
  3843  
  3844  // The barrier functions are available.
  3845  
  3846  // POSIX message queues are available.
  3847  
  3848  // Thread process-shared synchronization is supported.
  3849  
  3850  // The monotonic clock might be available.
  3851  
  3852  // The clock selection interfaces are available.
  3853  
  3854  // Advisory information interfaces are available.
  3855  
  3856  // IPv6 support is available.
  3857  
  3858  // Raw socket support is available.
  3859  
  3860  // We have at least one terminal.
  3861  
  3862  // Neither process nor thread sporadic server interfaces is available.
  3863  
  3864  // trace.h is not available.
  3865  
  3866  // Typed memory objects are not available.
  3867  
  3868  // Get the environment definitions from Unix98.
  3869  // Copyright (C) 1999-2018 Free Software Foundation, Inc.
  3870  //    This file is part of the GNU C Library.
  3871  //
  3872  //    The GNU C Library is free software; you can redistribute it and/or
  3873  //    modify it under the terms of the GNU Lesser General Public
  3874  //    License as published by the Free Software Foundation; either
  3875  //    version 2.1 of the License, or (at your option) any later version.
  3876  //
  3877  //    The GNU C Library is distributed in the hope that it will be useful,
  3878  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3879  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3880  //    Lesser General Public License for more details.
  3881  //
  3882  //    You should have received a copy of the GNU Lesser General Public
  3883  //    License along with the GNU C Library; if not, see
  3884  //    <http://www.gnu.org/licenses/>.
  3885  
  3886  // Determine the wordsize from the preprocessor defines.
  3887  
  3888  // This header should define the following symbols under the described
  3889  //    situations.  A value `1' means that the model is always supported,
  3890  //    `-1' means it is never supported.  Undefined means it cannot be
  3891  //    statically decided.
  3892  //
  3893  //    _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
  3894  //    _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
  3895  //
  3896  //    _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
  3897  //    _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
  3898  //
  3899  //    The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
  3900  //    _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
  3901  //    _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
  3902  //    used in previous versions of the Unix standard and are available
  3903  //    only for compatibility.
  3904  
  3905  // Environments with 32-bit wide pointers are optionally provided.
  3906  //    Therefore following macros aren't defined:
  3907  //    # undef _POSIX_V7_ILP32_OFF32
  3908  //    # undef _POSIX_V7_ILP32_OFFBIG
  3909  //    # undef _POSIX_V6_ILP32_OFF32
  3910  //    # undef _POSIX_V6_ILP32_OFFBIG
  3911  //    # undef _XBS5_ILP32_OFF32
  3912  //    # undef _XBS5_ILP32_OFFBIG
  3913  //    and users need to check at runtime.
  3914  
  3915  // We also have no use (for now) for an environment with bigger pointers
  3916  //    and offsets.
  3917  
  3918  // By default we have 64-bit wide `long int', pointers and `off_t'.
  3919  
  3920  // Standard file descriptors.
  3921  
  3922  // All functions that are not declared anywhere else.
  3923  
  3924  // bits/types.h -- definitions of __*_t types underlying *_t types.
  3925  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  3926  //    This file is part of the GNU C Library.
  3927  //
  3928  //    The GNU C Library is free software; you can redistribute it and/or
  3929  //    modify it under the terms of the GNU Lesser General Public
  3930  //    License as published by the Free Software Foundation; either
  3931  //    version 2.1 of the License, or (at your option) any later version.
  3932  //
  3933  //    The GNU C Library is distributed in the hope that it will be useful,
  3934  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3935  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3936  //    Lesser General Public License for more details.
  3937  //
  3938  //    You should have received a copy of the GNU Lesser General Public
  3939  //    License along with the GNU C Library; if not, see
  3940  //    <http://www.gnu.org/licenses/>.
  3941  
  3942  // Never include this file directly; use <sys/types.h> instead.
  3943  
  3944  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  3945  //
  3946  // This file is part of GCC.
  3947  //
  3948  // GCC is free software; you can redistribute it and/or modify
  3949  // it under the terms of the GNU General Public License as published by
  3950  // the Free Software Foundation; either version 3, or (at your option)
  3951  // any later version.
  3952  //
  3953  // GCC is distributed in the hope that it will be useful,
  3954  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  3955  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3956  // GNU General Public License for more details.
  3957  //
  3958  // Under Section 7 of GPL version 3, you are granted additional
  3959  // permissions described in the GCC Runtime Library Exception, version
  3960  // 3.1, as published by the Free Software Foundation.
  3961  //
  3962  // You should have received a copy of the GNU General Public License and
  3963  // a copy of the GCC Runtime Library Exception along with this program;
  3964  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  3965  // <http://www.gnu.org/licenses/>.
  3966  
  3967  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  3968  
  3969  // Any one of these symbols __need_* means that GNU libc
  3970  //    wants us just to define one data type.  So don't define
  3971  //    the symbols that indicate this file's entire job has been done.
  3972  
  3973  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  3974  //    There's no way to win with the other order!  Sun lossage.
  3975  
  3976  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  3977  //    one less case to deal with in the following.
  3978  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  3979  
  3980  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  3981  //    defined if the corresponding type is *not* defined.
  3982  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  3983  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  3984  
  3985  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  3986  //    Just ignore it.
  3987  
  3988  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  3989  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  3990  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  3991  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  3992  //    If we find that the macros are still defined at this point, we must
  3993  //    invoke them so that the type is defined as expected.
  3994  
  3995  // In case nobody has defined these types, but we aren't running under
  3996  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  3997  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  3998  //    parts of GCC is compiled by an older compiler, that actually
  3999  //    include gstddef.h, such as collect2.
  4000  
  4001  // Signed type of difference of two pointers.
  4002  
  4003  // Define this type if we are doing the whole job,
  4004  //    or if we want this type in particular.
  4005  
  4006  // Unsigned type of `sizeof' something.
  4007  
  4008  // Define this type if we are doing the whole job,
  4009  //    or if we want this type in particular.
  4010  
  4011  // Wide character type.
  4012  //    Locale-writers should change this as necessary to
  4013  //    be big enough to hold unique values not between 0 and 127,
  4014  //    and not (wchar_t) -1, for each defined multibyte character.
  4015  
  4016  // Define this type if we are doing the whole job,
  4017  //    or if we want this type in particular.
  4018  
  4019  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  4020  //     are already defined.
  4021  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  4022  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  4023  
  4024  // A null pointer constant.
  4025  
  4026  // The Single Unix specification says that some more types are
  4027  //    available here.
  4028  type gid_t = uint32 /* unistd.h:232:17 */
  4029  
  4030  type uid_t = uint32 /* unistd.h:237:17 */
  4031  
  4032  type useconds_t = uint32 /* unistd.h:255:22 */
  4033  
  4034  type pid_t = int32 /* unistd.h:260:17 */
  4035  
  4036  type intptr_t = int64 /* unistd.h:267:20 */
  4037  
  4038  type socklen_t = uint32 /* unistd.h:274:21 */
  4039  
  4040  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  4041  //     are already defined.
  4042  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  4043  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  4044  
  4045  // A null pointer constant.
  4046  
  4047  // XPG requires a few symbols from <sys/wait.h> being defined.
  4048  // Definitions of flag bits for `waitpid' et al.
  4049  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  4050  //    This file is part of the GNU C Library.
  4051  //
  4052  //    The GNU C Library is free software; you can redistribute it and/or
  4053  //    modify it under the terms of the GNU Lesser General Public
  4054  //    License as published by the Free Software Foundation; either
  4055  //    version 2.1 of the License, or (at your option) any later version.
  4056  //
  4057  //    The GNU C Library is distributed in the hope that it will be useful,
  4058  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4059  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4060  //    Lesser General Public License for more details.
  4061  //
  4062  //    You should have received a copy of the GNU Lesser General Public
  4063  //    License along with the GNU C Library; if not, see
  4064  //    <http://www.gnu.org/licenses/>.
  4065  
  4066  // Bits in the third argument to `waitpid'.
  4067  
  4068  // Bits in the fourth argument to `waitid'.
  4069  
  4070  // The following values are used by the `waitid' function.
  4071  
  4072  // The Linux kernel defines these bare, rather than an enum,
  4073  //    which causes a conflict if the include order is reversed.
  4074  
  4075  type idtype_t = uint32 /* waitflags.h:57:3 */
  4076  // Definitions of status bits for `wait' et al.
  4077  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  4078  //    This file is part of the GNU C Library.
  4079  //
  4080  //    The GNU C Library is free software; you can redistribute it and/or
  4081  //    modify it under the terms of the GNU Lesser General Public
  4082  //    License as published by the Free Software Foundation; either
  4083  //    version 2.1 of the License, or (at your option) any later version.
  4084  //
  4085  //    The GNU C Library is distributed in the hope that it will be useful,
  4086  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4087  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4088  //    Lesser General Public License for more details.
  4089  //
  4090  //    You should have received a copy of the GNU Lesser General Public
  4091  //    License along with the GNU C Library; if not, see
  4092  //    <http://www.gnu.org/licenses/>.
  4093  
  4094  // Everything extant so far uses these same bits.
  4095  
  4096  // If WIFEXITED(STATUS), the low-order 8 bits of the status.
  4097  
  4098  // If WIFSIGNALED(STATUS), the terminating signal.
  4099  
  4100  // If WIFSTOPPED(STATUS), the signal that stopped the child.
  4101  
  4102  // Nonzero if STATUS indicates normal termination.
  4103  
  4104  // Nonzero if STATUS indicates termination by a signal.
  4105  
  4106  // Nonzero if STATUS indicates the child is stopped.
  4107  
  4108  // Nonzero if STATUS indicates the child continued after a stop.  We only
  4109  //    define this if <bits/waitflags.h> provides the WCONTINUED flag bit.
  4110  
  4111  // Nonzero if STATUS indicates the child dumped core.
  4112  
  4113  // Macros for constructing status values.
  4114  
  4115  // Define the macros <sys/wait.h> also would define this way.
  4116  
  4117  // _FloatN API tests for enablement.
  4118  // Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
  4119  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4120  //    This file is part of the GNU C Library.
  4121  //
  4122  //    The GNU C Library is free software; you can redistribute it and/or
  4123  //    modify it under the terms of the GNU Lesser General Public
  4124  //    License as published by the Free Software Foundation; either
  4125  //    version 2.1 of the License, or (at your option) any later version.
  4126  //
  4127  //    The GNU C Library is distributed in the hope that it will be useful,
  4128  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4129  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4130  //    Lesser General Public License for more details.
  4131  //
  4132  //    You should have received a copy of the GNU Lesser General Public
  4133  //    License along with the GNU C Library; if not, see
  4134  //    <http://www.gnu.org/licenses/>.
  4135  
  4136  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4137  //    This file is part of the GNU C Library.
  4138  //
  4139  //    The GNU C Library is free software; you can redistribute it and/or
  4140  //    modify it under the terms of the GNU Lesser General Public
  4141  //    License as published by the Free Software Foundation; either
  4142  //    version 2.1 of the License, or (at your option) any later version.
  4143  //
  4144  //    The GNU C Library is distributed in the hope that it will be useful,
  4145  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4146  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4147  //    Lesser General Public License for more details.
  4148  //
  4149  //    You should have received a copy of the GNU Lesser General Public
  4150  //    License along with the GNU C Library; if not, see
  4151  //    <http://www.gnu.org/licenses/>.
  4152  
  4153  // Properties of long double type.  ldbl-opt version.
  4154  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  4155  //    This file is part of the GNU C Library.
  4156  //
  4157  //    The GNU C Library is free software; you can redistribute it and/or
  4158  //    modify it under the terms of the GNU Lesser General Public
  4159  //    License  published by the Free Software Foundation; either
  4160  //    version 2.1 of the License, or (at your option) any later version.
  4161  //
  4162  //    The GNU C Library is distributed in the hope that it will be useful,
  4163  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4164  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4165  //    Lesser General Public License for more details.
  4166  //
  4167  //    You should have received a copy of the GNU Lesser General Public
  4168  //    License along with the GNU C Library; if not, see
  4169  //    <http://www.gnu.org/licenses/>.
  4170  
  4171  // Defined to 1 if the current compiler invocation provides a
  4172  //    floating-point type with the IEEE 754 binary128 format, and this
  4173  //    glibc includes corresponding *f128 interfaces for it.
  4174  
  4175  // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
  4176  //    from the default float, double and long double types in this glibc.
  4177  
  4178  // Defined to 1 if the current compiler invocation provides a
  4179  //    floating-point type with the right format for _Float64x, and this
  4180  //    glibc includes corresponding *f64x interfaces for it.
  4181  
  4182  // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
  4183  //    of long double.  Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
  4184  //    the format of _Float128, which must be different from that of long
  4185  //    double.
  4186  
  4187  // Defined to concatenate the literal suffix to be used with _Float128
  4188  //    types, if __HAVE_FLOAT128 is 1.
  4189  
  4190  // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
  4191  
  4192  // The remaining of this file provides support for older compilers.
  4193  
  4194  // The type _Float128 exists only since GCC 7.0.
  4195  
  4196  // Various built-in functions do not exist before GCC 7.0.
  4197  
  4198  // Macros to control TS 18661-3 glibc features where the same
  4199  //    definitions are appropriate for all platforms.
  4200  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4201  //    This file is part of the GNU C Library.
  4202  //
  4203  //    The GNU C Library is free software; you can redistribute it and/or
  4204  //    modify it under the terms of the GNU Lesser General Public
  4205  //    License as published by the Free Software Foundation; either
  4206  //    version 2.1 of the License, or (at your option) any later version.
  4207  //
  4208  //    The GNU C Library is distributed in the hope that it will be useful,
  4209  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4210  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4211  //    Lesser General Public License for more details.
  4212  //
  4213  //    You should have received a copy of the GNU Lesser General Public
  4214  //    License along with the GNU C Library; if not, see
  4215  //    <http://www.gnu.org/licenses/>.
  4216  
  4217  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4218  //    This file is part of the GNU C Library.
  4219  //
  4220  //    The GNU C Library is free software; you can redistribute it and/or
  4221  //    modify it under the terms of the GNU Lesser General Public
  4222  //    License as published by the Free Software Foundation; either
  4223  //    version 2.1 of the License, or (at your option) any later version.
  4224  //
  4225  //    The GNU C Library is distributed in the hope that it will be useful,
  4226  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4227  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4228  //    Lesser General Public License for more details.
  4229  //
  4230  //    You should have received a copy of the GNU Lesser General Public
  4231  //    License along with the GNU C Library; if not, see
  4232  //    <http://www.gnu.org/licenses/>.
  4233  
  4234  // Properties of long double type.  ldbl-opt version.
  4235  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  4236  //    This file is part of the GNU C Library.
  4237  //
  4238  //    The GNU C Library is free software; you can redistribute it and/or
  4239  //    modify it under the terms of the GNU Lesser General Public
  4240  //    License  published by the Free Software Foundation; either
  4241  //    version 2.1 of the License, or (at your option) any later version.
  4242  //
  4243  //    The GNU C Library is distributed in the hope that it will be useful,
  4244  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4245  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4246  //    Lesser General Public License for more details.
  4247  //
  4248  //    You should have received a copy of the GNU Lesser General Public
  4249  //    License along with the GNU C Library; if not, see
  4250  //    <http://www.gnu.org/licenses/>.
  4251  
  4252  // This header should be included at the bottom of each bits/floatn.h.
  4253  //    It defines the following macros for each _FloatN and _FloatNx type,
  4254  //    where the same definitions, or definitions based only on the macros
  4255  //    in bits/floatn.h, are appropriate for all glibc configurations.
  4256  
  4257  // Defined to 1 if the current compiler invocation provides a
  4258  //    floating-point type with the right format for this type, and this
  4259  //    glibc includes corresponding *fN or *fNx interfaces for it.
  4260  
  4261  // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
  4262  //    type is the first with its format in the sequence of (the default
  4263  //    choices for) float, double, long double, _Float16, _Float32,
  4264  //    _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
  4265  //    glibc; that is, if functions present once per floating-point format
  4266  //    rather than once per type are present for this type.
  4267  //
  4268  //    All configurations supported by glibc have _Float32 the same format
  4269  //    as float, _Float64 and _Float32x the same format as double, the
  4270  //    _Float64x the same format as either long double or _Float128.  No
  4271  //    configurations support _Float128x or, as of GCC 7, have compiler
  4272  //    support for a type meeting the requirements for _Float128x.
  4273  
  4274  // Defined to 1 if the corresponding _FloatN type is not binary compatible
  4275  //    with the corresponding ISO C type in the current compilation unit as
  4276  //    opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
  4277  //    in glibc.
  4278  
  4279  // Defined to 1 if any _FloatN or _FloatNx types that are not
  4280  //    ABI-distinct are however distinct types at the C language level (so
  4281  //    for the purposes of __builtin_types_compatible_p and _Generic).
  4282  
  4283  // Defined to concatenate the literal suffix to be used with _FloatN
  4284  //    or _FloatNx types, if __HAVE_<type> is 1.  The corresponding
  4285  //    literal suffixes exist since GCC 7, for C only.
  4286  
  4287  // Defined to a complex type if __HAVE_<type> is 1.
  4288  
  4289  // The remaining of this file provides support for older compilers.
  4290  
  4291  // If double, long double and _Float64 all have the same set of
  4292  //    values, TS 18661-3 requires the usual arithmetic conversions on
  4293  //    long double and _Float64 to produce _Float64.  For this to be the
  4294  //    case when building with a compiler without a distinct _Float64
  4295  //    type, _Float64 must be a typedef for long double, not for
  4296  //    double.
  4297  
  4298  // Returned by `div'.
  4299  type div_t = struct {
  4300  	quot int32
  4301  	rem  int32
  4302  } /* stdlib.h:62:5 */
  4303  
  4304  // Returned by `ldiv'.
  4305  type ldiv_t = struct {
  4306  	quot int64
  4307  	rem  int64
  4308  } /* stdlib.h:70:5 */
  4309  
  4310  // Returned by `lldiv'.
  4311  type lldiv_t = struct {
  4312  	quot int64
  4313  	rem  int64
  4314  } /* stdlib.h:80:5 */
  4315  
  4316  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4317  //    This file is part of the GNU C Library.
  4318  //
  4319  //    The GNU C Library is free software; you can redistribute it and/or
  4320  //    modify it under the terms of the GNU Lesser General Public
  4321  //    License as published by the Free Software Foundation; either
  4322  //    version 2.1 of the License, or (at your option) any later version.
  4323  //
  4324  //    The GNU C Library is distributed in the hope that it will be useful,
  4325  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4326  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4327  //    Lesser General Public License for more details.
  4328  //
  4329  //    You should have received a copy of the GNU Lesser General Public
  4330  //    License along with the GNU C Library; if not, see
  4331  //    <http://www.gnu.org/licenses/>.
  4332  
  4333  //	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
  4334  
  4335  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4336  //    This file is part of the GNU C Library.
  4337  //
  4338  //    The GNU C Library is free software; you can redistribute it and/or
  4339  //    modify it under the terms of the GNU Lesser General Public
  4340  //    License as published by the Free Software Foundation; either
  4341  //    version 2.1 of the License, or (at your option) any later version.
  4342  //
  4343  //    The GNU C Library is distributed in the hope that it will be useful,
  4344  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4345  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4346  //    Lesser General Public License for more details.
  4347  //
  4348  //    You should have received a copy of the GNU Lesser General Public
  4349  //    License along with the GNU C Library; if not, see
  4350  //    <http://www.gnu.org/licenses/>.
  4351  
  4352  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4353  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4354  //    This file is part of the GNU C Library.
  4355  //
  4356  //    The GNU C Library is free software; you can redistribute it and/or
  4357  //    modify it under the terms of the GNU Lesser General Public
  4358  //    License as published by the Free Software Foundation; either
  4359  //    version 2.1 of the License, or (at your option) any later version.
  4360  //
  4361  //    The GNU C Library is distributed in the hope that it will be useful,
  4362  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4363  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4364  //    Lesser General Public License for more details.
  4365  //
  4366  //    You should have received a copy of the GNU Lesser General Public
  4367  //    License along with the GNU C Library; if not, see
  4368  //    <http://www.gnu.org/licenses/>.
  4369  
  4370  // Never include this file directly; use <sys/types.h> instead.
  4371  
  4372  type u_char = uint8                    /* types.h:33:18 */
  4373  type u_short = uint16                  /* types.h:34:19 */
  4374  type u_int = uint32                    /* types.h:35:17 */
  4375  type u_long = uint64                   /* types.h:36:18 */
  4376  type quad_t = int64                    /* types.h:37:18 */
  4377  type u_quad_t = uint64                 /* types.h:38:20 */
  4378  type fsid_t = struct{ __val [2]int32 } /* types.h:39:18 */
  4379  type loff_t = int64                    /* types.h:42:18 */
  4380  
  4381  type ino_t = uint64 /* types.h:49:19 */
  4382  
  4383  type dev_t = uint64 /* types.h:59:17 */
  4384  
  4385  type mode_t = uint32 /* types.h:69:18 */
  4386  
  4387  type nlink_t = uint64 /* types.h:74:19 */
  4388  
  4389  type id_t = uint32 /* types.h:103:16 */
  4390  
  4391  type daddr_t = int32   /* types.h:114:19 */
  4392  type caddr_t = uintptr /* types.h:115:19 */
  4393  
  4394  type key_t = int32 /* types.h:121:17 */
  4395  
  4396  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4397  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4398  //    This file is part of the GNU C Library.
  4399  //
  4400  //    The GNU C Library is free software; you can redistribute it and/or
  4401  //    modify it under the terms of the GNU Lesser General Public
  4402  //    License as published by the Free Software Foundation; either
  4403  //    version 2.1 of the License, or (at your option) any later version.
  4404  //
  4405  //    The GNU C Library is distributed in the hope that it will be useful,
  4406  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4407  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4408  //    Lesser General Public License for more details.
  4409  //
  4410  //    You should have received a copy of the GNU Lesser General Public
  4411  //    License along with the GNU C Library; if not, see
  4412  //    <http://www.gnu.org/licenses/>.
  4413  
  4414  // Never include this file directly; use <sys/types.h> instead.
  4415  
  4416  // Returned by `clock'.
  4417  type clock_t = int64 /* clock_t.h:7:19 */
  4418  
  4419  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4420  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4421  //    This file is part of the GNU C Library.
  4422  //
  4423  //    The GNU C Library is free software; you can redistribute it and/or
  4424  //    modify it under the terms of the GNU Lesser General Public
  4425  //    License as published by the Free Software Foundation; either
  4426  //    version 2.1 of the License, or (at your option) any later version.
  4427  //
  4428  //    The GNU C Library is distributed in the hope that it will be useful,
  4429  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4430  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4431  //    Lesser General Public License for more details.
  4432  //
  4433  //    You should have received a copy of the GNU Lesser General Public
  4434  //    License along with the GNU C Library; if not, see
  4435  //    <http://www.gnu.org/licenses/>.
  4436  
  4437  // Never include this file directly; use <sys/types.h> instead.
  4438  
  4439  // Clock ID used in clock and timer functions.
  4440  type clockid_t = int32 /* clockid_t.h:7:21 */
  4441  
  4442  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4443  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4444  //    This file is part of the GNU C Library.
  4445  //
  4446  //    The GNU C Library is free software; you can redistribute it and/or
  4447  //    modify it under the terms of the GNU Lesser General Public
  4448  //    License as published by the Free Software Foundation; either
  4449  //    version 2.1 of the License, or (at your option) any later version.
  4450  //
  4451  //    The GNU C Library is distributed in the hope that it will be useful,
  4452  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4453  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4454  //    Lesser General Public License for more details.
  4455  //
  4456  //    You should have received a copy of the GNU Lesser General Public
  4457  //    License along with the GNU C Library; if not, see
  4458  //    <http://www.gnu.org/licenses/>.
  4459  
  4460  // Never include this file directly; use <sys/types.h> instead.
  4461  
  4462  // Returned by `time'.
  4463  type time_t = int64 /* time_t.h:7:18 */
  4464  
  4465  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4466  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4467  //    This file is part of the GNU C Library.
  4468  //
  4469  //    The GNU C Library is free software; you can redistribute it and/or
  4470  //    modify it under the terms of the GNU Lesser General Public
  4471  //    License as published by the Free Software Foundation; either
  4472  //    version 2.1 of the License, or (at your option) any later version.
  4473  //
  4474  //    The GNU C Library is distributed in the hope that it will be useful,
  4475  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4476  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4477  //    Lesser General Public License for more details.
  4478  //
  4479  //    You should have received a copy of the GNU Lesser General Public
  4480  //    License along with the GNU C Library; if not, see
  4481  //    <http://www.gnu.org/licenses/>.
  4482  
  4483  // Never include this file directly; use <sys/types.h> instead.
  4484  
  4485  // Timer ID returned by `timer_create'.
  4486  type timer_t = uintptr /* timer_t.h:7:19 */
  4487  
  4488  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  4489  //
  4490  // This file is part of GCC.
  4491  //
  4492  // GCC is free software; you can redistribute it and/or modify
  4493  // it under the terms of the GNU General Public License as published by
  4494  // the Free Software Foundation; either version 3, or (at your option)
  4495  // any later version.
  4496  //
  4497  // GCC is distributed in the hope that it will be useful,
  4498  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  4499  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4500  // GNU General Public License for more details.
  4501  //
  4502  // Under Section 7 of GPL version 3, you are granted additional
  4503  // permissions described in the GCC Runtime Library Exception, version
  4504  // 3.1, as published by the Free Software Foundation.
  4505  //
  4506  // You should have received a copy of the GNU General Public License and
  4507  // a copy of the GCC Runtime Library Exception along with this program;
  4508  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  4509  // <http://www.gnu.org/licenses/>.
  4510  
  4511  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  4512  
  4513  // Any one of these symbols __need_* means that GNU libc
  4514  //    wants us just to define one data type.  So don't define
  4515  //    the symbols that indicate this file's entire job has been done.
  4516  
  4517  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  4518  //    There's no way to win with the other order!  Sun lossage.
  4519  
  4520  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  4521  //    one less case to deal with in the following.
  4522  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  4523  
  4524  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  4525  //    defined if the corresponding type is *not* defined.
  4526  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  4527  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  4528  
  4529  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  4530  //    Just ignore it.
  4531  
  4532  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  4533  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  4534  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  4535  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  4536  //    If we find that the macros are still defined at this point, we must
  4537  //    invoke them so that the type is defined as expected.
  4538  
  4539  // In case nobody has defined these types, but we aren't running under
  4540  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  4541  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  4542  //    parts of GCC is compiled by an older compiler, that actually
  4543  //    include gstddef.h, such as collect2.
  4544  
  4545  // Signed type of difference of two pointers.
  4546  
  4547  // Define this type if we are doing the whole job,
  4548  //    or if we want this type in particular.
  4549  
  4550  // Unsigned type of `sizeof' something.
  4551  
  4552  // Define this type if we are doing the whole job,
  4553  //    or if we want this type in particular.
  4554  
  4555  // Wide character type.
  4556  //    Locale-writers should change this as necessary to
  4557  //    be big enough to hold unique values not between 0 and 127,
  4558  //    and not (wchar_t) -1, for each defined multibyte character.
  4559  
  4560  // Define this type if we are doing the whole job,
  4561  //    or if we want this type in particular.
  4562  
  4563  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  4564  //     are already defined.
  4565  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  4566  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  4567  
  4568  // A null pointer constant.
  4569  
  4570  // Old compatibility names for C types.
  4571  type ulong = uint64  /* types.h:148:27 */
  4572  type ushort = uint16 /* types.h:149:28 */
  4573  type uint = uint32   /* types.h:150:22 */
  4574  
  4575  // These size-specific names are used by some of the inet code.
  4576  
  4577  // Define intN_t types.
  4578  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4579  //    This file is part of the GNU C Library.
  4580  //
  4581  //    The GNU C Library is free software; you can redistribute it and/or
  4582  //    modify it under the terms of the GNU Lesser General Public
  4583  //    License as published by the Free Software Foundation; either
  4584  //    version 2.1 of the License, or (at your option) any later version.
  4585  //
  4586  //    The GNU C Library is distributed in the hope that it will be useful,
  4587  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4588  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4589  //    Lesser General Public License for more details.
  4590  //
  4591  //    You should have received a copy of the GNU Lesser General Public
  4592  //    License along with the GNU C Library; if not, see
  4593  //    <http://www.gnu.org/licenses/>.
  4594  
  4595  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4596  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4597  //    This file is part of the GNU C Library.
  4598  //
  4599  //    The GNU C Library is free software; you can redistribute it and/or
  4600  //    modify it under the terms of the GNU Lesser General Public
  4601  //    License as published by the Free Software Foundation; either
  4602  //    version 2.1 of the License, or (at your option) any later version.
  4603  //
  4604  //    The GNU C Library is distributed in the hope that it will be useful,
  4605  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4606  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4607  //    Lesser General Public License for more details.
  4608  //
  4609  //    You should have received a copy of the GNU Lesser General Public
  4610  //    License along with the GNU C Library; if not, see
  4611  //    <http://www.gnu.org/licenses/>.
  4612  
  4613  // Never include this file directly; use <sys/types.h> instead.
  4614  
  4615  type int8_t = int8   /* stdint-intn.h:24:18 */
  4616  type int16_t = int16 /* stdint-intn.h:25:19 */
  4617  type int32_t = int32 /* stdint-intn.h:26:19 */
  4618  type int64_t = int64 /* stdint-intn.h:27:19 */
  4619  
  4620  // For GCC 2.7 and later, we can use specific type-size attributes.
  4621  
  4622  type u_int8_t = uint32  /* types.h:177:1 */
  4623  type u_int16_t = uint32 /* types.h:178:1 */
  4624  type u_int32_t = uint32 /* types.h:179:1 */
  4625  type u_int64_t = uint32 /* types.h:180:1 */
  4626  
  4627  type register_t = int32 /* types.h:182:13 */
  4628  
  4629  // A set of signals to be blocked, unblocked, or waited for.
  4630  type sigset_t = struct{ __val [16]uint64 } /* sigset_t.h:7:20 */
  4631  
  4632  // Get definition of timer specification structures.
  4633  
  4634  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4635  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4636  //    This file is part of the GNU C Library.
  4637  //
  4638  //    The GNU C Library is free software; you can redistribute it and/or
  4639  //    modify it under the terms of the GNU Lesser General Public
  4640  //    License as published by the Free Software Foundation; either
  4641  //    version 2.1 of the License, or (at your option) any later version.
  4642  //
  4643  //    The GNU C Library is distributed in the hope that it will be useful,
  4644  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4645  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4646  //    Lesser General Public License for more details.
  4647  //
  4648  //    You should have received a copy of the GNU Lesser General Public
  4649  //    License along with the GNU C Library; if not, see
  4650  //    <http://www.gnu.org/licenses/>.
  4651  
  4652  // Never include this file directly; use <sys/types.h> instead.
  4653  
  4654  // A time value that is accurate to the nearest
  4655  //    microsecond but also has a range of years.
  4656  type timeval = struct {
  4657  	tv_sec  int64
  4658  	tv_usec int64
  4659  } /* struct_timeval.h:8:1 */
  4660  
  4661  // NB: Include guard matches what <linux/time.h> uses.
  4662  
  4663  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4664  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  4665  //    This file is part of the GNU C Library.
  4666  //
  4667  //    The GNU C Library is free software; you can redistribute it and/or
  4668  //    modify it under the terms of the GNU Lesser General Public
  4669  //    License as published by the Free Software Foundation; either
  4670  //    version 2.1 of the License, or (at your option) any later version.
  4671  //
  4672  //    The GNU C Library is distributed in the hope that it will be useful,
  4673  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4674  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4675  //    Lesser General Public License for more details.
  4676  //
  4677  //    You should have received a copy of the GNU Lesser General Public
  4678  //    License along with the GNU C Library; if not, see
  4679  //    <http://www.gnu.org/licenses/>.
  4680  
  4681  // Never include this file directly; use <sys/types.h> instead.
  4682  
  4683  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  4684  //    has nanoseconds instead of microseconds.
  4685  type timespec = struct {
  4686  	tv_sec  int64
  4687  	tv_nsec int64
  4688  } /* struct_timespec.h:9:1 */
  4689  
  4690  type suseconds_t = int64 /* select.h:43:23 */
  4691  
  4692  // Some versions of <linux/posix_types.h> define this macros.
  4693  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  4694  
  4695  // fd_set for select and pselect.
  4696  type fd_set = struct{ __fds_bits [16]int64 } /* select.h:70:5 */
  4697  
  4698  // Maximum number of file descriptors in `fd_set'.
  4699  
  4700  // Sometimes the fd_set member is assumed to have this type.
  4701  type fd_mask = int64 /* select.h:77:19 */
  4702  
  4703  // Define some inlines helping to catch common problems.
  4704  
  4705  type blksize_t = int64 /* types.h:202:21 */
  4706  
  4707  // Types from the Large File Support interface.
  4708  type blkcnt_t = int64    /* types.h:222:22 */ // Type to count number of disk blocks.
  4709  type fsblkcnt_t = uint64 /* types.h:226:24 */ // Type to count file system blocks.
  4710  type fsfilcnt_t = uint64 /* types.h:230:24 */ // Type to count file system inodes.
  4711  
  4712  // Now add the thread types.
  4713  // Declaration of common pthread types for all architectures.
  4714  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4715  //    This file is part of the GNU C Library.
  4716  //
  4717  //    The GNU C Library is free software; you can redistribute it and/or
  4718  //    modify it under the terms of the GNU Lesser General Public
  4719  //    License as published by the Free Software Foundation; either
  4720  //    version 2.1 of the License, or (at your option) any later version.
  4721  //
  4722  //    The GNU C Library is distributed in the hope that it will be useful,
  4723  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4724  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4725  //    Lesser General Public License for more details.
  4726  //
  4727  //    You should have received a copy of the GNU Lesser General Public
  4728  //    License along with the GNU C Library; if not, see
  4729  //    <http://www.gnu.org/licenses/>.
  4730  
  4731  // For internal mutex and condition variable definitions.
  4732  // Common threading primitives definitions for both POSIX and C11.
  4733  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4734  //    This file is part of the GNU C Library.
  4735  //
  4736  //    The GNU C Library is free software; you can redistribute it and/or
  4737  //    modify it under the terms of the GNU Lesser General Public
  4738  //    License as published by the Free Software Foundation; either
  4739  //    version 2.1 of the License, or (at your option) any later version.
  4740  //
  4741  //    The GNU C Library is distributed in the hope that it will be useful,
  4742  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4743  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4744  //    Lesser General Public License for more details.
  4745  //
  4746  //    You should have received a copy of the GNU Lesser General Public
  4747  //    License along with the GNU C Library; if not, see
  4748  //    <http://www.gnu.org/licenses/>.
  4749  
  4750  // Arch-specific definitions.  Each architecture must define the following
  4751  //    macros to define the expected sizes of pthread data types:
  4752  //
  4753  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  4754  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  4755  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  4756  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  4757  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  4758  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  4759  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  4760  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  4761  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  4762  //
  4763  //    Also, the following macros must be define for internal pthread_mutex_t
  4764  //    struct definitions (struct __pthread_mutex_s):
  4765  //
  4766  //    __PTHREAD_COMPAT_PADDING_MID   - any additional members after 'kind'
  4767  // 				    and before '__spin' (for 64 bits) or
  4768  // 				    '__nusers' (for 32 bits).
  4769  //    __PTHREAD_COMPAT_PADDING_END   - any additional members at the end of
  4770  // 				    the internal structure.
  4771  //    __PTHREAD_MUTEX_LOCK_ELISION   - 1 if the architecture supports lock
  4772  // 				    elision or 0 otherwise.
  4773  //    __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers.  The
  4774  // 				       preferred value for new architectures
  4775  // 				       is 0.
  4776  //    __PTHREAD_MUTEX_USE_UNION      - control whether internal __spins and
  4777  // 				    __list will be place inside a union for
  4778  // 				    linuxthreads compatibility.
  4779  // 				    The preferred value for new architectures
  4780  // 				    is 0.
  4781  //
  4782  //    For a new port the preferred values for the required defines are:
  4783  //
  4784  //    #define __PTHREAD_COMPAT_PADDING_MID
  4785  //    #define __PTHREAD_COMPAT_PADDING_END
  4786  //    #define __PTHREAD_MUTEX_LOCK_ELISION         0
  4787  //    #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND    0
  4788  //    #define __PTHREAD_MUTEX_USE_UNION            0
  4789  //
  4790  //    __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
  4791  //    eventually support lock elision using transactional memory.
  4792  //
  4793  //    The additional macro defines any constraint for the lock alignment
  4794  //    inside the thread structures:
  4795  //
  4796  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  4797  //
  4798  //    Same idea but for the once locking primitive:
  4799  //
  4800  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  4801  //
  4802  //    And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
  4803  //    must be defined.
  4804  //
  4805  // Copyright (C) 2003-2018 Free Software Foundation, Inc.
  4806  //    This file is part of the GNU C Library.
  4807  //
  4808  //    The GNU C Library is free software; you can redistribute it and/or
  4809  //    modify it under the terms of the GNU Lesser General Public
  4810  //    License as published by the Free Software Foundation; either
  4811  //    version 2.1 of the License, or (at your option) any later version.
  4812  //
  4813  //    The GNU C Library is distributed in the hope that it will be useful,
  4814  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4815  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4816  //    Lesser General Public License for more details.
  4817  //
  4818  //    You should have received a copy of the GNU Lesser General Public
  4819  //    License along with the GNU C Library; if not, see
  4820  //    <http://www.gnu.org/licenses/>.
  4821  
  4822  // Determine the wordsize from the preprocessor defines.
  4823  
  4824  // Definitions for internal mutex struct.
  4825  
  4826  type __pthread_rwlock_arch_t = struct {
  4827  	__readers       uint32
  4828  	__writers       uint32
  4829  	__wrphase_futex uint32
  4830  	__writers_futex uint32
  4831  	__pad3          uint32
  4832  	__pad4          uint32
  4833  	__cur_writer    int32
  4834  	__shared        int32
  4835  	__pad1          uint64
  4836  	__pad2          uint64
  4837  	__flags         uint32
  4838  	_               [4]byte
  4839  } /* pthreadtypes-arch.h:50:1 */
  4840  
  4841  // Common definition of pthread_mutex_t.
  4842  
  4843  type __pthread_internal_list = struct {
  4844  	__prev uintptr
  4845  	__next uintptr
  4846  } /* thread-shared-types.h:82:9 */
  4847  
  4848  // Lock elision support.
  4849  
  4850  type __pthread_mutex_s = struct {
  4851  	__lock    int32
  4852  	__count   uint32
  4853  	__owner   int32
  4854  	__nusers  uint32
  4855  	__kind    int32
  4856  	__spins   int16
  4857  	__elision int16
  4858  	__list    struct {
  4859  		__prev uintptr
  4860  		__next uintptr
  4861  	}
  4862  } /* thread-shared-types.h:118:1 */
  4863  
  4864  // Common definition of pthread_cond_t.
  4865  
  4866  type __pthread_cond_s = struct {
  4867  	__0            struct{ __wseq uint64 }
  4868  	__8            struct{ __g1_start uint64 }
  4869  	__g_refs       [2]uint32
  4870  	__g_size       [2]uint32
  4871  	__g1_orig_size uint32
  4872  	__wrefs        uint32
  4873  	__g_signals    [2]uint32
  4874  } /* thread-shared-types.h:171:1 */
  4875  
  4876  // Thread identifiers.  The structure of the attribute type is not
  4877  //    exposed on purpose.
  4878  type pthread_t = uint64 /* pthreadtypes.h:27:27 */
  4879  
  4880  // Data structures for mutex handling.  The structure of the attribute
  4881  //    type is not exposed on purpose.
  4882  type pthread_mutexattr_t = struct {
  4883  	_      [0]uint32
  4884  	__size [4]int8
  4885  } /* pthreadtypes.h:36:3 */
  4886  
  4887  // Data structure for condition variable handling.  The structure of
  4888  //    the attribute type is not exposed on purpose.
  4889  type pthread_condattr_t = struct {
  4890  	_      [0]uint32
  4891  	__size [4]int8
  4892  } /* pthreadtypes.h:45:3 */
  4893  
  4894  // Keys for thread-specific data
  4895  type pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  4896  
  4897  // Once-only execution
  4898  type pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  4899  
  4900  type pthread_attr_t1 = struct {
  4901  	_      [0]uint64
  4902  	__size [56]int8
  4903  } /* pthreadtypes.h:56:1 */
  4904  
  4905  type pthread_attr_t = pthread_attr_t1 /* pthreadtypes.h:62:30 */
  4906  
  4907  type pthread_mutex_t = struct{ __data __pthread_mutex_s } /* pthreadtypes.h:72:3 */
  4908  
  4909  type pthread_cond_t = struct{ __data __pthread_cond_s } /* pthreadtypes.h:80:3 */
  4910  
  4911  // Data structure for reader-writer lock variable handling.  The
  4912  //    structure of the attribute type is deliberately not exposed.
  4913  type pthread_rwlock_t = struct{ __data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  4914  
  4915  type pthread_rwlockattr_t = struct {
  4916  	_      [0]uint64
  4917  	__size [8]int8
  4918  } /* pthreadtypes.h:97:3 */
  4919  
  4920  // POSIX spinlock data type.
  4921  type pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  4922  
  4923  // POSIX barriers data type.  The structure of the type is
  4924  //    deliberately not exposed.
  4925  type pthread_barrier_t = struct {
  4926  	_      [0]uint64
  4927  	__size [32]int8
  4928  } /* pthreadtypes.h:112:3 */
  4929  
  4930  type pthread_barrierattr_t = struct {
  4931  	_      [0]uint32
  4932  	__size [4]int8
  4933  } /* pthreadtypes.h:118:3 */
  4934  
  4935  // Reentrant versions of the `random' family of functions.
  4936  //    These functions all use the following data structure to contain
  4937  //    state, rather than global state variables.
  4938  
  4939  type random_data = struct {
  4940  	fptr      uintptr
  4941  	rptr      uintptr
  4942  	state     uintptr
  4943  	rand_type int32
  4944  	rand_deg  int32
  4945  	rand_sep  int32
  4946  	_         [4]byte
  4947  	end_ptr   uintptr
  4948  } /* stdlib.h:423:1 */
  4949  
  4950  // Data structure for communication with thread safe versions.  This
  4951  //    type is to be regarded as opaque.  It's only exported because users
  4952  //    have to allocate objects of this type.
  4953  type drand48_data = struct {
  4954  	__x     [3]uint16
  4955  	__old_x [3]uint16
  4956  	__c     uint16
  4957  	__init  uint16
  4958  	__a     uint64
  4959  } /* stdlib.h:490:1 */
  4960  
  4961  // POSIX.1-2008 extended locale interface (see locale.h).
  4962  // Definition of locale_t.
  4963  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4964  //    This file is part of the GNU C Library.
  4965  //
  4966  //    The GNU C Library is free software; you can redistribute it and/or
  4967  //    modify it under the terms of the GNU Lesser General Public
  4968  //    License as published by the Free Software Foundation; either
  4969  //    version 2.1 of the License, or (at your option) any later version.
  4970  //
  4971  //    The GNU C Library is distributed in the hope that it will be useful,
  4972  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4973  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4974  //    Lesser General Public License for more details.
  4975  //
  4976  //    You should have received a copy of the GNU Lesser General Public
  4977  //    License along with the GNU C Library; if not, see
  4978  //    <http://www.gnu.org/licenses/>.
  4979  
  4980  // Definition of struct __locale_struct and __locale_t.
  4981  //    Copyright (C) 1997-2018 Free Software Foundation, Inc.
  4982  //    This file is part of the GNU C Library.
  4983  //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  4984  //
  4985  //    The GNU C Library is free software; you can redistribute it and/or
  4986  //    modify it under the terms of the GNU Lesser General Public
  4987  //    License as published by the Free Software Foundation; either
  4988  //    version 2.1 of the License, or (at your option) any later version.
  4989  //
  4990  //    The GNU C Library is distributed in the hope that it will be useful,
  4991  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4992  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4993  //    Lesser General Public License for more details.
  4994  //
  4995  //    You should have received a copy of the GNU Lesser General Public
  4996  //    License along with the GNU C Library; if not, see
  4997  //    <http://www.gnu.org/licenses/>.
  4998  
  4999  // POSIX.1-2008: the locale_t type, representing a locale context
  5000  //    (implementation-namespace version).  This type should be treated
  5001  //    as opaque by applications; some details are exposed for the sake of
  5002  //    efficiency in e.g. ctype functions.
  5003  
  5004  type __locale_struct = struct {
  5005  	__locales       [13]uintptr
  5006  	__ctype_b       uintptr
  5007  	__ctype_tolower uintptr
  5008  	__ctype_toupper uintptr
  5009  	__names         [13]uintptr
  5010  } /* __locale_t.h:28:1 */
  5011  
  5012  type locale_t = uintptr /* locale_t.h:24:20 */
  5013  
  5014  // The suffix to append to the child command lines, if any
  5015  
  5016  // The directory separator character(s)
  5017  
  5018  // Mark a parameter as unused to suppress compiler warnings
  5019  
  5020  // Global data
  5021  type Global = struct {
  5022  	argv0            uintptr
  5023  	zVfs             uintptr
  5024  	zDbFile          uintptr
  5025  	db               uintptr
  5026  	zErrLog          uintptr
  5027  	pErrLog          uintptr
  5028  	zLog             uintptr
  5029  	pLog             uintptr
  5030  	zName            [32]int8
  5031  	taskId           int32
  5032  	iTrace           int32
  5033  	bSqlTrace        int32
  5034  	bIgnoreSqlErrors int32
  5035  	nError           int32
  5036  	nTest            int32
  5037  	iTimeout         int32
  5038  	bSync            int32
  5039  } /* mptest.c:72:8 */
  5040  
  5041  // The suffix to append to the child command lines, if any
  5042  
  5043  // The directory separator character(s)
  5044  
  5045  // Mark a parameter as unused to suppress compiler warnings
  5046  
  5047  // Global data
  5048  var g Global /* mptest.c:90:3: */
  5049  
  5050  // Default timeout
  5051  
  5052  // Print a message adding zPrefix[] to the beginning of every line.
  5053  func printWithPrefix(tls *libc.TLS, pOut uintptr, zPrefix uintptr, zMsg uintptr) { /* mptest.c:98:13: */
  5054  	bp := tls.Alloc(24)
  5055  	defer tls.Free(24)
  5056  
  5057  	for (zMsg != 0) && (*(*int8)(unsafe.Pointer(zMsg)) != 0) {
  5058  		var i int32
  5059  		for i = 0; ((*(*int8)(unsafe.Pointer(zMsg + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zMsg + uintptr(i)))) != '\n')) && (int32(*(*int8)(unsafe.Pointer(zMsg + uintptr(i)))) != '\r'); i++ {
  5060  		}
  5061  		libc.Xfprintf(tls, pOut, ts /* "%s%.*s\n" */, libc.VaList(bp, zPrefix, i, zMsg))
  5062  		zMsg += uintptr(i)
  5063  		for (int32(*(*int8)(unsafe.Pointer(zMsg))) == '\n') || (int32(*(*int8)(unsafe.Pointer(zMsg))) == '\r') {
  5064  			zMsg++
  5065  		}
  5066  	}
  5067  }
  5068  
  5069  // Compare two pointers to strings, where the pointers might be NULL.
  5070  func safe_strcmp(tls *libc.TLS, a uintptr, b uintptr) int32 { /* mptest.c:111:12: */
  5071  	if a == b {
  5072  		return 0
  5073  	}
  5074  	if a == uintptr(0) {
  5075  		return -1
  5076  	}
  5077  	if b == uintptr(0) {
  5078  		return 1
  5079  	}
  5080  	return libc.Xstrcmp(tls, a, b)
  5081  }
  5082  
  5083  // Return TRUE if string z[] matches glob pattern zGlob[].
  5084  // Return FALSE if the pattern does not match.
  5085  //
  5086  // Globbing rules:
  5087  //
  5088  //      '*'       Matches any sequence of zero or more characters.
  5089  //
  5090  //      '?'       Matches exactly one character.
  5091  //
  5092  //     [...]      Matches one character from the enclosed list of
  5093  //                characters.
  5094  //
  5095  //     [^...]     Matches one character not in the enclosed list.
  5096  //
  5097  //      '#'       Matches any sequence of one or more digits with an
  5098  //                optional + or - sign in front
  5099  func strglob(tls *libc.TLS, zGlob uintptr, z uintptr) int32 { /* mptest.c:136:5: */
  5100  	var c int32
  5101  	var c2 int32
  5102  	var invert int32
  5103  	var seen int32
  5104  
  5105  	for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) != 0 {
  5106  		if c == '*' {
  5107  			for ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) == '*') || (c == '?') {
  5108  				if (c == '?') && ((int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0) {
  5109  					return 0
  5110  				}
  5111  			}
  5112  			if c == 0 {
  5113  				return 1
  5114  			} else if c == '[' {
  5115  				for (*(*int8)(unsafe.Pointer(z)) != 0) && (strglob(tls, (zGlob-uintptr(1)), z) != 0) {
  5116  					z++
  5117  				}
  5118  				return (libc.Bool32((int32(*(*int8)(unsafe.Pointer(z)))) != 0))
  5119  			}
  5120  			for (libc.AssignInt32(&c2, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 {
  5121  				for c2 != c {
  5122  					c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))
  5123  					if c2 == 0 {
  5124  						return 0
  5125  					}
  5126  				}
  5127  				if strglob(tls, zGlob, z) != 0 {
  5128  					return 1
  5129  				}
  5130  			}
  5131  			return 0
  5132  		} else if c == '?' {
  5133  			if (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0 {
  5134  				return 0
  5135  			}
  5136  		} else if c == '[' {
  5137  			var prior_c int32 = 0
  5138  			seen = 0
  5139  			invert = 0
  5140  			c = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))
  5141  			if c == 0 {
  5142  				return 0
  5143  			}
  5144  			c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
  5145  			if c2 == '^' {
  5146  				invert = 1
  5147  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
  5148  			}
  5149  			if c2 == ']' {
  5150  				if c == ']' {
  5151  					seen = 1
  5152  				}
  5153  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
  5154  			}
  5155  			for (c2 != 0) && (c2 != ']') {
  5156  				if (((c2 == '-') && (int32(*(*int8)(unsafe.Pointer(zGlob))) != ']')) && (int32(*(*int8)(unsafe.Pointer(zGlob))) != 0)) && (prior_c > 0) {
  5157  					c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
  5158  					if (c >= prior_c) && (c <= c2) {
  5159  						seen = 1
  5160  					}
  5161  					prior_c = 0
  5162  				} else {
  5163  					if c == c2 {
  5164  						seen = 1
  5165  					}
  5166  					prior_c = c2
  5167  				}
  5168  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
  5169  			}
  5170  			if (c2 == 0) || ((seen ^ invert) == 0) {
  5171  				return 0
  5172  			}
  5173  		} else if c == '#' {
  5174  			if ((int32(*(*int8)(unsafe.Pointer(z))) == '-') || (int32(*(*int8)(unsafe.Pointer(z))) == '+')) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + 1)))))*2))) & int32(_ISdigit)) != 0) {
  5175  				z++
  5176  			}
  5177  			if !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z)))))*2))) & int32(_ISdigit)) != 0) {
  5178  				return 0
  5179  			}
  5180  			z++
  5181  			for (int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z)))))*2))) & int32(_ISdigit)) != 0 {
  5182  				z++
  5183  			}
  5184  		} else {
  5185  			if c != (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) {
  5186  				return 0
  5187  			}
  5188  		}
  5189  	}
  5190  	return (libc.Bool32(int32(*(*int8)(unsafe.Pointer(z))) == 0))
  5191  }
  5192  
  5193  // Close output stream pOut if it is not stdout or stderr
  5194  func maybeClose(tls *libc.TLS, pOut uintptr) { /* mptest.c:208:13: */
  5195  	if (pOut != libc.Xstdout) && (pOut != libc.Xstderr) {
  5196  		libc.Xfclose(tls, pOut)
  5197  	}
  5198  }
  5199  
  5200  // Print an error message
  5201  func errorMessage(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:215:13: */
  5202  	bp := tls.Alloc(38)
  5203  	defer tls.Free(38)
  5204  
  5205  	var ap va_list
  5206  	_ = ap
  5207  	var zMsg uintptr
  5208  	// var zPrefix [30]int8 at bp+8, 30
  5209  
  5210  	ap = va
  5211  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5212  	_ = ap
  5213  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+8 /* "%s:ERROR: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
  5214  	if g.pLog != 0 {
  5215  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
  5216  		libc.Xfflush(tls, g.pLog)
  5217  	}
  5218  	if (g.pErrLog != 0) && (safe_strcmp(tls, g.zErrLog, g.zLog) != 0) {
  5219  		printWithPrefix(tls, g.pErrLog, bp+8 /* &zPrefix[0] */, zMsg)
  5220  		libc.Xfflush(tls, g.pErrLog)
  5221  	}
  5222  	sqlite3.Xsqlite3_free(tls, zMsg)
  5223  	g.nError++
  5224  }
  5225  
  5226  // Print an error message and then quit.
  5227  func fatalError(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:241:13: */
  5228  	bp := tls.Alloc(38)
  5229  	defer tls.Free(38)
  5230  
  5231  	var ap va_list
  5232  	_ = ap
  5233  	var zMsg uintptr
  5234  	// var zPrefix [30]int8 at bp+8, 30
  5235  
  5236  	ap = va
  5237  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5238  	_ = ap
  5239  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+19 /* "%s:FATAL: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
  5240  	if g.pLog != 0 {
  5241  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
  5242  		libc.Xfflush(tls, g.pLog)
  5243  		maybeClose(tls, g.pLog)
  5244  	}
  5245  	if (g.pErrLog != 0) && (safe_strcmp(tls, g.zErrLog, g.zLog) != 0) {
  5246  		printWithPrefix(tls, g.pErrLog, bp+8 /* &zPrefix[0] */, zMsg)
  5247  		libc.Xfflush(tls, g.pErrLog)
  5248  		maybeClose(tls, g.pErrLog)
  5249  	}
  5250  	sqlite3.Xsqlite3_free(tls, zMsg)
  5251  	if g.db != 0 {
  5252  		var nTry int32 = 0
  5253  		g.iTimeout = 0
  5254  		for (trySql(tls, ts+30 /* "UPDATE client SE..." */, 0) == SQLITE_BUSY) &&
  5255  			((libc.PostIncInt32(&nTry, 1)) < 100) {
  5256  			sqlite3.Xsqlite3_sleep(tls, 10)
  5257  		}
  5258  	}
  5259  	sqlite3.Xsqlite3_close(tls, g.db)
  5260  	libc.Xexit(tls, 1)
  5261  }
  5262  
  5263  // Print a log message
  5264  func logMessage(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:276:13: */
  5265  	bp := tls.Alloc(38)
  5266  	defer tls.Free(38)
  5267  
  5268  	var ap va_list
  5269  	_ = ap
  5270  	var zMsg uintptr
  5271  	// var zPrefix [30]int8 at bp+8, 30
  5272  
  5273  	ap = va
  5274  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5275  	_ = ap
  5276  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+60 /* "%s: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
  5277  	if g.pLog != 0 {
  5278  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
  5279  		libc.Xfflush(tls, g.pLog)
  5280  	}
  5281  	sqlite3.Xsqlite3_free(tls, zMsg)
  5282  }
  5283  
  5284  // Return the length of a string omitting trailing whitespace
  5285  func clipLength(tls *libc.TLS, z uintptr) int32 { /* mptest.c:294:12: */
  5286  	var n int32 = int32(libc.Xstrlen(tls, z))
  5287  	for (n > 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n - 1)))))))*2))) & int32(_ISspace)) != 0) {
  5288  		n--
  5289  	}
  5290  	return n
  5291  }
  5292  
  5293  // Auxiliary SQL function to return the name of the VFS
  5294  func vfsNameFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* mptest.c:303:13: */
  5295  	bp := tls.Alloc(8)
  5296  	defer tls.Free(8)
  5297  
  5298  	var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context)
  5299  	*(*uintptr)(unsafe.Pointer(bp /* zVfs */)) = uintptr(0)
  5300  	_ = argc
  5301  	_ = argv
  5302  	sqlite3.Xsqlite3_file_control(tls, db, ts+65 /* "main" */, SQLITE_FCNTL_VFSNAME, bp /* &zVfs */)
  5303  	if *(*uintptr)(unsafe.Pointer(bp /* zVfs */)) != 0 {
  5304  		sqlite3.Xsqlite3_result_text(tls, context, *(*uintptr)(unsafe.Pointer(bp /* zVfs */)), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free})))
  5305  	}
  5306  }
  5307  
  5308  // Busy handler with a g.iTimeout-millisecond timeout
  5309  func busyHandler(tls *libc.TLS, pCD uintptr, count int32) int32 { /* mptest.c:321:12: */
  5310  	bp := tls.Alloc(8)
  5311  	defer tls.Free(8)
  5312  
  5313  	_ = pCD
  5314  	if (count * 10) > g.iTimeout {
  5315  		if g.iTimeout > 0 {
  5316  			errorMessage(tls, ts+70 /* "timeout after %d..." */, libc.VaList(bp, g.iTimeout))
  5317  		}
  5318  		return 0
  5319  	}
  5320  	sqlite3.Xsqlite3_sleep(tls, 10)
  5321  	return 1
  5322  }
  5323  
  5324  // SQL Trace callback
  5325  func sqlTraceCallback(tls *libc.TLS, NotUsed1 uintptr, zSql uintptr) { /* mptest.c:334:13: */
  5326  	bp := tls.Alloc(16)
  5327  	defer tls.Free(16)
  5328  
  5329  	_ = NotUsed1
  5330  	logMessage(tls, ts+89 /* "[%.*s]" */, libc.VaList(bp, clipLength(tls, zSql), zSql))
  5331  }
  5332  
  5333  // SQL error log callback
  5334  func sqlErrorCallback(tls *libc.TLS, pArg uintptr, iErrCode int32, zMsg uintptr) { /* mptest.c:342:13: */
  5335  	bp := tls.Alloc(24)
  5336  	defer tls.Free(24)
  5337  
  5338  	_ = pArg
  5339  	if (iErrCode == SQLITE_ERROR) && (g.bIgnoreSqlErrors != 0) {
  5340  		return
  5341  	}
  5342  	if ((iErrCode & 0xff) == SQLITE_SCHEMA) && (g.iTrace < 3) {
  5343  		return
  5344  	}
  5345  	if ((g.iTimeout == 0) && ((iErrCode & 0xff) == SQLITE_BUSY)) && (g.iTrace < 3) {
  5346  		return
  5347  	}
  5348  	if (iErrCode & 0xff) == SQLITE_NOTICE {
  5349  		logMessage(tls, ts+96 /* "(info) %s" */, libc.VaList(bp, zMsg))
  5350  	} else {
  5351  		errorMessage(tls, ts+106 /* "(errcode=%d) %s" */, libc.VaList(bp+8, iErrCode, zMsg))
  5352  	}
  5353  }
  5354  
  5355  // Prepare an SQL statement.  Issue a fatal error if unable.
  5356  func prepareSql(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* mptest.c:357:21: */
  5357  	bp := tls.Alloc(24)
  5358  	defer tls.Free(24)
  5359  
  5360  	var ap va_list
  5361  	_ = ap
  5362  	var zSql uintptr
  5363  	var rc int32
  5364  	*(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0)
  5365  	ap = va
  5366  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5367  	_ = ap
  5368  	rc = sqlite3.Xsqlite3_prepare_v2(tls, g.db, zSql, -1, bp+16 /* &pStmt */, uintptr(0))
  5369  	if rc != SQLITE_OK {
  5370  		sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))
  5371  		fatalError(tls, ts+122 /* "%s\n%s\n" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db), zSql))
  5372  	}
  5373  	sqlite3.Xsqlite3_free(tls, zSql)
  5374  	return *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))
  5375  }
  5376  
  5377  // Run arbitrary SQL.  Issue a fatal error on failure.
  5378  func runSql(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:377:13: */
  5379  	bp := tls.Alloc(16)
  5380  	defer tls.Free(16)
  5381  
  5382  	var ap va_list
  5383  	_ = ap
  5384  	var zSql uintptr
  5385  	var rc int32
  5386  	ap = va
  5387  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5388  	_ = ap
  5389  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, uintptr(0), uintptr(0), uintptr(0))
  5390  	if rc != SQLITE_OK {
  5391  		fatalError(tls, ts+122 /* "%s\n%s\n" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db), zSql))
  5392  	}
  5393  	sqlite3.Xsqlite3_free(tls, zSql)
  5394  }
  5395  
  5396  // Try to run arbitrary SQL.  Return success code.
  5397  func trySql(tls *libc.TLS, zFormat uintptr, va uintptr) int32 { /* mptest.c:394:12: */
  5398  	var ap va_list
  5399  	_ = ap
  5400  	var zSql uintptr
  5401  	var rc int32
  5402  	ap = va
  5403  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5404  	_ = ap
  5405  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, uintptr(0), uintptr(0), uintptr(0))
  5406  	sqlite3.Xsqlite3_free(tls, zSql)
  5407  	return rc
  5408  }
  5409  
  5410  // Structure for holding an arbitrary length string
  5411  type String1 = struct {
  5412  	z      uintptr
  5413  	n      int32
  5414  	nAlloc int32
  5415  } /* mptest.c:408:9 */
  5416  
  5417  // Structure for holding an arbitrary length string
  5418  type String = String1 /* mptest.c:408:23 */
  5419  
  5420  // Free a string
  5421  func stringFree(tls *libc.TLS, p uintptr) { /* mptest.c:416:13: */
  5422  	if (*String)(unsafe.Pointer(p)).z != 0 {
  5423  		sqlite3.Xsqlite3_free(tls, (*String)(unsafe.Pointer(p)).z)
  5424  	}
  5425  	libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(String{})))
  5426  }
  5427  
  5428  // Append n bytes of text to a string.  If n<0 append the entire string.
  5429  func stringAppend(tls *libc.TLS, p uintptr, z uintptr, n int32) { /* mptest.c:422:13: */
  5430  	if n < 0 {
  5431  		n = int32(libc.Xstrlen(tls, z))
  5432  	}
  5433  	if ((*String)(unsafe.Pointer(p)).n + n) >= (*String)(unsafe.Pointer(p)).nAlloc {
  5434  		var nAlloc int32 = ((((*String)(unsafe.Pointer(p)).nAlloc * 2) + n) + 100)
  5435  		var zNew uintptr = sqlite3.Xsqlite3_realloc(tls, (*String)(unsafe.Pointer(p)).z, nAlloc)
  5436  		if zNew == uintptr(0) {
  5437  			fatalError(tls, ts+129 /* "out of memory" */, 0)
  5438  		}
  5439  		(*String)(unsafe.Pointer(p)).z = zNew
  5440  		(*String)(unsafe.Pointer(p)).nAlloc = nAlloc
  5441  	}
  5442  	libc.Xmemcpy(tls, ((*String)(unsafe.Pointer(p)).z + uintptr((*String)(unsafe.Pointer(p)).n)), z, uint64(n))
  5443  	*(*int32)(unsafe.Pointer(p + 8 /* &.n */)) += (n)
  5444  	*(*int8)(unsafe.Pointer((*String)(unsafe.Pointer(p)).z + uintptr((*String)(unsafe.Pointer(p)).n))) = int8(0)
  5445  }
  5446  
  5447  // Reset a string to an empty string
  5448  func stringReset(tls *libc.TLS, p uintptr) { /* mptest.c:437:13: */
  5449  	if (*String)(unsafe.Pointer(p)).z == uintptr(0) {
  5450  		stringAppend(tls, p, ts+143 /* " " */, 1)
  5451  	}
  5452  	(*String)(unsafe.Pointer(p)).n = 0
  5453  	*(*int8)(unsafe.Pointer((*String)(unsafe.Pointer(p)).z)) = int8(0)
  5454  }
  5455  
  5456  // Append a new token onto the end of the string
  5457  func stringAppendTerm(tls *libc.TLS, p uintptr, z uintptr) { /* mptest.c:444:13: */
  5458  	var i int32
  5459  	if (*String)(unsafe.Pointer(p)).n != 0 {
  5460  		stringAppend(tls, p, ts+143 /* " " */, 1)
  5461  	}
  5462  	if z == uintptr(0) {
  5463  		stringAppend(tls, p, ts+145 /* "nil" */, 3)
  5464  		return
  5465  	}
  5466  	for i = 0; (*(*int8)(unsafe.Pointer(z + uintptr(i))) != 0) && !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))))*2))) & int32(_ISspace)) != 0); i++ {
  5467  	}
  5468  	if (i > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == 0) {
  5469  		stringAppend(tls, p, z, i)
  5470  		return
  5471  	}
  5472  	stringAppend(tls, p, ts+149 /* "'" */, 1)
  5473  	for *(*int8)(unsafe.Pointer(z)) != 0 {
  5474  		for i = 0; (*(*int8)(unsafe.Pointer(z + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '\''); i++ {
  5475  		}
  5476  		if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 {
  5477  			stringAppend(tls, p, z, (i + 1))
  5478  			stringAppend(tls, p, ts+149 /* "'" */, 1)
  5479  			z += (uintptr(i + 1))
  5480  		} else {
  5481  			stringAppend(tls, p, z, i)
  5482  			break
  5483  		}
  5484  	}
  5485  	stringAppend(tls, p, ts+149 /* "'" */, 1)
  5486  }
  5487  
  5488  // Callback function for evalSql()
  5489  func evalCallback(tls *libc.TLS, pCData uintptr, argc int32, argv uintptr, azCol uintptr) int32 { /* mptest.c:474:12: */
  5490  	var p uintptr = pCData
  5491  	var i int32
  5492  	_ = azCol
  5493  	for i = 0; i < argc; i++ {
  5494  		stringAppendTerm(tls, p, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
  5495  	}
  5496  	return 0
  5497  }
  5498  
  5499  // Run arbitrary SQL and record the results in an output string
  5500  // given by the first parameter.
  5501  func evalSql(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) int32 { /* mptest.c:486:12: */
  5502  	bp := tls.Alloc(46)
  5503  	defer tls.Free(46)
  5504  
  5505  	var ap va_list
  5506  	_ = ap
  5507  	var zSql uintptr
  5508  	var rc int32
  5509  	*(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)) = uintptr(0)
  5510  	ap = va
  5511  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
  5512  	_ = ap
  5513  
  5514  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, *(*uintptr)(unsafe.Pointer(&struct {
  5515  		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
  5516  	}{evalCallback})), p, bp+8 /* &zErrMsg */)
  5517  	sqlite3.Xsqlite3_free(tls, zSql)
  5518  	if rc != 0 {
  5519  		// var zErr [30]int8 at bp+16, 30
  5520  
  5521  		sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zErr[0] */, ts+151 /* "error(%d)" */, libc.VaList(bp, rc))
  5522  		stringAppendTerm(tls, p, bp+16 /* &zErr[0] */)
  5523  		if *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)) != 0 {
  5524  			stringAppendTerm(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)))
  5525  			sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)))
  5526  		}
  5527  	}
  5528  	return rc
  5529  }
  5530  
  5531  // Auxiliary SQL function to recursively evaluate SQL.
  5532  func evalFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* mptest.c:512:13: */
  5533  	bp := tls.Alloc(24)
  5534  	defer tls.Free(24)
  5535  
  5536  	var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context)
  5537  	var zSql uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
  5538  	// var res String at bp, 16
  5539  
  5540  	*(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)) = uintptr(0)
  5541  	var rc int32
  5542  	_ = argc
  5543  	libc.Xmemset(tls, bp /* &res */, 0, uint64(unsafe.Sizeof(String{})))
  5544  	rc = sqlite3.Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct {
  5545  		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
  5546  	}{evalCallback})), bp /* &res */, bp+16 /* &zErrMsg */)
  5547  	if *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)) != 0 {
  5548  		sqlite3.Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)), -1)
  5549  		sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)))
  5550  	} else if rc != 0 {
  5551  		sqlite3.Xsqlite3_result_error_code(tls, context, rc)
  5552  	} else {
  5553  		sqlite3.Xsqlite3_result_text(tls, context, (*String)(unsafe.Pointer(bp /* &res */)).z, -1, libc.UintptrFromInt32(-1))
  5554  	}
  5555  	stringFree(tls, bp /* &res */)
  5556  }
  5557  
  5558  // Look up the next task for client iClient in the database.
  5559  // Return the task script and the task number and mark that
  5560  // task as being under way.
  5561  func startScript(tls *libc.TLS, iClient int32, pzScript uintptr, pTaskId uintptr, pzTaskName uintptr) int32 { /* mptest.c:541:12: */
  5562  	bp := tls.Alloc(80)
  5563  	defer tls.Free(80)
  5564  
  5565  	var pStmt uintptr = uintptr(0)
  5566  	var taskId int32
  5567  	var rc int32
  5568  	var totalTime int32 = 0
  5569  
  5570  	*(*uintptr)(unsafe.Pointer(pzScript)) = uintptr(0)
  5571  	g.iTimeout = 0
  5572  	for 1 != 0 {
  5573  		rc = trySql(tls, ts+161 /* "BEGIN IMMEDIATE" */, 0)
  5574  		if rc == SQLITE_BUSY {
  5575  			sqlite3.Xsqlite3_sleep(tls, 10)
  5576  			totalTime = totalTime + (10)
  5577  			continue
  5578  		}
  5579  		if rc != SQLITE_OK {
  5580  			fatalError(tls, ts+177 /* "in startScript: ..." */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db)))
  5581  		}
  5582  		if (g.nError != 0) || (g.nTest != 0) {
  5583  			runSql(tls, ts+196, /* "UPDATE counters ..." */
  5584  				libc.VaList(bp+8, g.nError, g.nTest))
  5585  			g.nError = 0
  5586  			g.nTest = 0
  5587  		}
  5588  		pStmt = prepareSql(tls, ts+249 /* "SELECT 1 FROM cl..." */, libc.VaList(bp+24, iClient))
  5589  		rc = sqlite3.Xsqlite3_step(tls, pStmt)
  5590  		sqlite3.Xsqlite3_finalize(tls, pStmt)
  5591  		if rc == SQLITE_ROW {
  5592  			runSql(tls, ts+295 /* "DELETE FROM clie..." */, libc.VaList(bp+32, iClient))
  5593  			g.iTimeout = DEFAULT_TIMEOUT
  5594  			runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0)
  5595  			return SQLITE_DONE
  5596  		}
  5597  		pStmt = prepareSql(tls,
  5598  
  5599  			ts+346 /* "SELECT script, i..." */, libc.VaList(bp+40, iClient))
  5600  		rc = sqlite3.Xsqlite3_step(tls, pStmt)
  5601  		if rc == SQLITE_ROW {
  5602  			var n int32 = sqlite3.Xsqlite3_column_bytes(tls, pStmt, 0)
  5603  			*(*uintptr)(unsafe.Pointer(pzScript)) = sqlite3.Xsqlite3_malloc(tls, (n + 1))
  5604  			libc.Xstrcpy(tls, *(*uintptr)(unsafe.Pointer(pzScript)), sqlite3.Xsqlite3_column_text(tls, pStmt, 0))
  5605  			*(*int32)(unsafe.Pointer(pTaskId)) = libc.AssignInt32(&taskId, sqlite3.Xsqlite3_column_int(tls, pStmt, 1))
  5606  			*(*uintptr)(unsafe.Pointer(pzTaskName)) = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, libc.VaList(bp+48, sqlite3.Xsqlite3_column_text(tls, pStmt, 2)))
  5607  			sqlite3.Xsqlite3_finalize(tls, pStmt)
  5608  			runSql(tls,
  5609  
  5610  				ts+441 /* "UPDATE task   SE..." */, libc.VaList(bp+56, taskId))
  5611  			g.iTimeout = DEFAULT_TIMEOUT
  5612  			runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0)
  5613  			return SQLITE_OK
  5614  		}
  5615  		sqlite3.Xsqlite3_finalize(tls, pStmt)
  5616  		if rc == SQLITE_DONE {
  5617  			if totalTime > 30000 {
  5618  				errorMessage(tls, ts+524 /* "Waited over 30 s..." */, 0)
  5619  				runSql(tls, ts+573 /* "DELETE FROM clie..." */, libc.VaList(bp+64, iClient))
  5620  				sqlite3.Xsqlite3_close(tls, g.db)
  5621  				libc.Xexit(tls, 1)
  5622  			}
  5623  			for trySql(tls, ts+613 /* "COMMIT" */, 0) == SQLITE_BUSY {
  5624  				sqlite3.Xsqlite3_sleep(tls, 10)
  5625  				totalTime = totalTime + (10)
  5626  			}
  5627  			sqlite3.Xsqlite3_sleep(tls, 100)
  5628  			totalTime = totalTime + (100)
  5629  			continue
  5630  		}
  5631  		fatalError(tls, ts+438 /* "%s" */, libc.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, g.db)))
  5632  	}
  5633  	g.iTimeout = DEFAULT_TIMEOUT
  5634  	return int32(0)
  5635  }
  5636  
  5637  // Mark a script as having finished.   Remove the CLIENT table entry
  5638  // if bShutdown is true.
  5639  func finishScript(tls *libc.TLS, iClient int32, taskId int32, bShutdown int32) int32 { /* mptest.c:623:12: */
  5640  	bp := tls.Alloc(16)
  5641  	defer tls.Free(16)
  5642  
  5643  	runSql(tls,
  5644  
  5645  		ts+620 /* "UPDATE task   SE..." */, libc.VaList(bp, taskId))
  5646  	if bShutdown != 0 {
  5647  		runSql(tls, ts+295 /* "DELETE FROM clie..." */, libc.VaList(bp+8, iClient))
  5648  	}
  5649  	return SQLITE_OK
  5650  }
  5651  
  5652  // Start up a client process for iClient, if it is not already
  5653  // running.  If the client is already running, then this routine
  5654  // is a no-op.
  5655  func startClient(tls *libc.TLS, iClient int32) { /* mptest.c:638:13: */
  5656  	bp := tls.Alloc(96)
  5657  	defer tls.Free(96)
  5658  
  5659  	runSql(tls, ts+701 /* "INSERT OR IGNORE..." */, libc.VaList(bp, iClient))
  5660  	if sqlite3.Xsqlite3_changes(tls, g.db) != 0 {
  5661  		var zSys uintptr
  5662  		var rc int32
  5663  		zSys = sqlite3.Xsqlite3_mprintf(tls, ts+743, /* "%s \"%s\" --client..." */
  5664  			libc.VaList(bp+8, g.argv0, g.zDbFile, iClient, g.iTrace))
  5665  		if g.bSqlTrace != 0 {
  5666  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+774 /* "%z --sqltrace" */, libc.VaList(bp+40, zSys))
  5667  		}
  5668  		if g.bSync != 0 {
  5669  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+788 /* "%z --sync" */, libc.VaList(bp+48, zSys))
  5670  		}
  5671  		if g.zVfs != 0 {
  5672  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+798 /* "%z --vfs \"%s\"" */, libc.VaList(bp+56, zSys, g.zVfs))
  5673  		}
  5674  		if g.iTrace >= 2 {
  5675  			logMessage(tls, ts+812 /* "system('%q')" */, libc.VaList(bp+72, zSys))
  5676  		}
  5677  		zSys = sqlite3.Xsqlite3_mprintf(tls, ts+825 /* "%z &" */, libc.VaList(bp+80, zSys))
  5678  		rc = libc.Xsystem(tls, zSys)
  5679  		if rc != 0 {
  5680  			errorMessage(tls, ts+830 /* "system() fails w..." */, libc.VaList(bp+88, rc))
  5681  		}
  5682  		sqlite3.Xsqlite3_free(tls, zSys)
  5683  	}
  5684  }
  5685  
  5686  // Read the entire content of a file into memory
  5687  func readFile(tls *libc.TLS, zFilename uintptr) uintptr { /* mptest.c:684:13: */
  5688  	bp := tls.Alloc(8)
  5689  	defer tls.Free(8)
  5690  
  5691  	var in uintptr = libc.Xfopen(tls, zFilename, ts+864 /* "rb" */)
  5692  	var sz int64
  5693  	var z uintptr
  5694  	if in == uintptr(0) {
  5695  		fatalError(tls, ts+867 /* "cannot open \"%s\"..." */, libc.VaList(bp, zFilename))
  5696  	}
  5697  	libc.Xfseek(tls, in, int64(0), SEEK_END)
  5698  	sz = libc.Xftell(tls, in)
  5699  	libc.Xrewind(tls, in)
  5700  	z = sqlite3.Xsqlite3_malloc(tls, (int32(sz + int64(1))))
  5701  	sz = int64(libc.Xfread(tls, z, uint64(1), uint64(sz), in))
  5702  	*(*int8)(unsafe.Pointer(z + uintptr(sz))) = int8(0)
  5703  	libc.Xfclose(tls, in)
  5704  	return z
  5705  }
  5706  
  5707  // Return the length of the next token.
  5708  func tokenLength(tls *libc.TLS, z uintptr, pnLine uintptr) int32 { /* mptest.c:704:12: */
  5709  	var n int32 = 0
  5710  	if ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z)))))*2))) & int32(_ISspace)) != 0) || ((int32(*(*int8)(unsafe.Pointer(z))) == '/') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == '*')) {
  5711  		var inC int32 = 0
  5712  		var c int32
  5713  		if int32(*(*int8)(unsafe.Pointer(z))) == '/' {
  5714  			inC = 1
  5715  			n = 2
  5716  		}
  5717  		for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&n, 1))))))) != 0 {
  5718  			if c == '\n' {
  5719  				(*(*int32)(unsafe.Pointer(pnLine)))++
  5720  			}
  5721  			if (int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(c)))*2))) & int32(_ISspace)) != 0 {
  5722  				continue
  5723  			}
  5724  			if ((inC != 0) && (c == '*')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '/') {
  5725  				n++
  5726  				inC = 0
  5727  			} else if (!(inC != 0) && (c == '/')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '*') {
  5728  				n++
  5729  				inC = 1
  5730  			} else if !(inC != 0) {
  5731  				break
  5732  			}
  5733  		}
  5734  		n--
  5735  	} else if (int32(*(*int8)(unsafe.Pointer(z))) == '-') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == '-') {
  5736  		for n = 2; (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) != '\n'); n++ {
  5737  		}
  5738  		if *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 {
  5739  			(*(*int32)(unsafe.Pointer(pnLine)))++
  5740  			n++
  5741  		}
  5742  	} else if (int32(*(*int8)(unsafe.Pointer(z))) == '"') || (int32(*(*int8)(unsafe.Pointer(z))) == '\'') {
  5743  		var delim int32 = int32(*(*int8)(unsafe.Pointer(z)))
  5744  		for n = 1; *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0; n++ {
  5745  			if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '\n' {
  5746  				(*(*int32)(unsafe.Pointer(pnLine)))++
  5747  			}
  5748  			if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == delim {
  5749  				n++
  5750  				if int32(*(*int8)(unsafe.Pointer(z + uintptr((n + 1))))) != delim {
  5751  					break
  5752  				}
  5753  			}
  5754  		}
  5755  	} else {
  5756  		var c int32
  5757  		for n = 1; (((((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))))) != 0) && !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(c)))*2))) & int32(_ISspace)) != 0)) && (c != '"')) && (c != '\'')) && (c != ';'); n++ {
  5758  		}
  5759  	}
  5760  	return n
  5761  }
  5762  
  5763  // Copy a single token into a string buffer.
  5764  func extractToken(tls *libc.TLS, zIn uintptr, nIn int32, zOut uintptr, nOut int32) int32 { /* mptest.c:749:12: */
  5765  	var i int32
  5766  	if nIn <= 0 {
  5767  		*(*int8)(unsafe.Pointer(zOut)) = int8(0)
  5768  		return 0
  5769  	}
  5770  	for i = 0; ((i < nIn) && (i < (nOut - 1))) && !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(i))))))*2))) & int32(_ISspace)) != 0); i++ {
  5771  		*(*int8)(unsafe.Pointer(zOut + uintptr(i))) = *(*int8)(unsafe.Pointer(zIn + uintptr(i)))
  5772  	}
  5773  	*(*int8)(unsafe.Pointer(zOut + uintptr(i))) = int8(0)
  5774  	return i
  5775  }
  5776  
  5777  // Find the number of characters up to the start of the next "--end" token.
  5778  func findEnd(tls *libc.TLS, z uintptr, pnLine uintptr) int32 { /* mptest.c:763:12: */
  5779  	var n int32 = 0
  5780  	for (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && ((libc.Xstrncmp(tls, (z+uintptr(n)), ts+896 /* "--end" */, uint64(5)) != 0) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 5)))))))*2))) & int32(_ISspace)) != 0)) {
  5781  		n = n + (tokenLength(tls, (z + uintptr(n)), pnLine))
  5782  	}
  5783  	return n
  5784  }
  5785  
  5786  // Find the number of characters up to the first character past the
  5787  // of the next "--endif"  or "--else" token. Nested --if commands are
  5788  // also skipped.
  5789  func findEndif(tls *libc.TLS, z uintptr, stopAtElse int32, pnLine uintptr) int32 { /* mptest.c:776:12: */
  5790  	var n int32 = 0
  5791  	for *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 {
  5792  		var len int32 = tokenLength(tls, (z + uintptr(n)), pnLine)
  5793  		if ((libc.Xstrncmp(tls, (z+uintptr(n)), ts+902 /* "--endif" */, uint64(7)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 7)))))))*2))) & int32(_ISspace)) != 0)) ||
  5794  			(((stopAtElse != 0) && (libc.Xstrncmp(tls, (z+uintptr(n)), ts+910 /* "--else" */, uint64(6)) == 0)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 6)))))))*2))) & int32(_ISspace)) != 0)) {
  5795  			return (n + len)
  5796  		}
  5797  		if (libc.Xstrncmp(tls, (z+uintptr(n)), ts+917 /* "--if" */, uint64(4)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 4)))))))*2))) & int32(_ISspace)) != 0) {
  5798  			var skip int32 = findEndif(tls, ((z + uintptr(n)) + uintptr(len)), 0, pnLine)
  5799  			n = n + (skip + len)
  5800  		} else {
  5801  			n = n + (len)
  5802  		}
  5803  	}
  5804  	return n
  5805  }
  5806  
  5807  // Wait for a client process to complete all its tasks
  5808  func waitForClient(tls *libc.TLS, iClient int32, iTimeout int32, zErrPrefix uintptr) { /* mptest.c:798:13: */
  5809  	bp := tls.Alloc(32)
  5810  	defer tls.Free(32)
  5811  
  5812  	var pStmt uintptr
  5813  	var rc int32
  5814  	if iClient > 0 {
  5815  		pStmt = prepareSql(tls,
  5816  
  5817  			ts+922, /* "SELECT 1 FROM ta..." */
  5818  			libc.VaList(bp, iClient))
  5819  	} else {
  5820  		pStmt = prepareSql(tls,
  5821  
  5822  			ts+1018 /* "SELECT 1 FROM ta..." */, 0)
  5823  	}
  5824  	g.iTimeout = 0
  5825  	for (((libc.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == SQLITE_BUSY) || (rc == SQLITE_ROW)) &&
  5826  		(iTimeout > 0) {
  5827  		sqlite3.Xsqlite3_reset(tls, pStmt)
  5828  		sqlite3.Xsqlite3_sleep(tls, 50)
  5829  		iTimeout = iTimeout - (50)
  5830  	}
  5831  	sqlite3.Xsqlite3_finalize(tls, pStmt)
  5832  	g.iTimeout = DEFAULT_TIMEOUT
  5833  	if rc != SQLITE_DONE {
  5834  		if zErrPrefix == uintptr(0) {
  5835  			zErrPrefix = ts + 1099 /* "" */
  5836  		}
  5837  		if iClient > 0 {
  5838  			errorMessage(tls, ts+1100 /* "%stimeout waitin..." */, libc.VaList(bp+8, zErrPrefix, iClient))
  5839  		} else {
  5840  			errorMessage(tls, ts+1132 /* "%stimeout waitin..." */, libc.VaList(bp+24, zErrPrefix))
  5841  		}
  5842  	}
  5843  }
  5844  
  5845  // Return a pointer to the tail of a filename
  5846  func filenameTail(tls *libc.TLS, z uintptr) uintptr { /* mptest.c:836:13: */
  5847  	var i int32
  5848  	var j int32
  5849  	for i = libc.AssignInt32(&j, 0); *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ {
  5850  		if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i))))) == '/' {
  5851  			j = (i + 1)
  5852  		}
  5853  	}
  5854  	return (z + uintptr(j))
  5855  }
  5856  
  5857  // Interpret zArg as a boolean value.  Return either 0 or 1.
  5858  func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */
  5859  	bp := tls.Alloc(8)
  5860  	defer tls.Free(8)
  5861  
  5862  	var i int32
  5863  	if zArg == uintptr(0) {
  5864  		return 0
  5865  	}
  5866  	for i = 0; (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) <= '9'); i++ {
  5867  	}
  5868  	if (i > 0) && (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) == 0) {
  5869  		return libc.Xatoi(tls, zArg)
  5870  	}
  5871  	if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1166 /* "on" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1169 /* "yes" */) == 0) {
  5872  		return 1
  5873  	}
  5874  	if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1173 /* "off" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1177 /* "no" */) == 0) {
  5875  		return 0
  5876  	}
  5877  	errorMessage(tls, ts+1180 /* "unknown boolean:..." */, libc.VaList(bp, zArg))
  5878  	return 0
  5879  }
  5880  
  5881  // This routine exists as a convenient place to set a debugger
  5882  // breakpoint.
  5883  func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */
  5884  	atomic.AddInt32(&cnt, 1)
  5885  }
  5886  
  5887  var cnt int32 = 0 /* mptest.c:864:56 */
  5888  
  5889  // Maximum number of arguments to a --command
  5890  
  5891  // Run a script.
  5892  func runScript(tls *libc.TLS, iClient int32, taskId int32, zScript uintptr, zFilename uintptr) { /* mptest.c:872:13: */
  5893  	bp := tls.Alloc(1610)
  5894  	defer tls.Free(1610)
  5895  
  5896  	*(*int32)(unsafe.Pointer(bp + 376 /* lineno */)) = 1
  5897  	var prevLine int32 = 1
  5898  	var ii int32 = 0
  5899  	var iBegin int32 = 0
  5900  	var n int32
  5901  	var c int32
  5902  	var j int32
  5903  	var len int32
  5904  	var nArg int32
  5905  	// var sResult String at bp+360, 16
  5906  
  5907  	// var zCmd [30]int8 at bp+380, 30
  5908  
  5909  	// var zError [1000]int8 at bp+610, 1000
  5910  
  5911  	// var azArg [2][100]int8 at bp+410, 200
  5912  
  5913  	libc.Xmemset(tls, bp+360 /* &sResult */, 0, uint64(unsafe.Sizeof(String{})))
  5914  	stringReset(tls, bp+360 /* &sResult */)
  5915  	for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zScript + uintptr(ii)))))) != 0 {
  5916  		prevLine = *(*int32)(unsafe.Pointer(bp + 376 /* lineno */))
  5917  		len = tokenLength(tls, (zScript + uintptr(ii)), bp+376 /* &lineno */)
  5918  		if ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(c)))*2))) & int32(_ISspace)) != 0) || ((c == '/') && (int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 1))))) == '*')) {
  5919  			ii = ii + (len)
  5920  			continue
  5921  		}
  5922  		if ((c != '-') || (int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 1))))) != '-')) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 2))))))*2))) & int32(_ISalpha)) != 0) {
  5923  			ii = ii + (len)
  5924  			continue
  5925  		}
  5926  
  5927  		// Run any prior SQL before processing the new --command
  5928  		if ii > iBegin {
  5929  			var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp, (ii-iBegin), (zScript+uintptr(iBegin))))
  5930  			evalSql(tls, bp+360 /* &sResult */, zSql, 0)
  5931  			sqlite3.Xsqlite3_free(tls, zSql)
  5932  			iBegin = (ii + len)
  5933  		}
  5934  
  5935  		// Parse the --command
  5936  		if g.iTrace >= 2 {
  5937  			logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+16, len, (zScript+uintptr(ii))))
  5938  		}
  5939  		n = extractToken(tls, ((zScript + uintptr(ii)) + uintptr(2)), (len - 2), bp+380 /* &zCmd[0] */, int32(unsafe.Sizeof([30]int8{})))
  5940  		for nArg = 0; (n < (len - 2)) && (nArg < MX_ARG); nArg++ {
  5941  			for (n < (len - 2)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr(((ii + 2) + n)))))))*2))) & int32(_ISspace)) != 0) {
  5942  				n++
  5943  			}
  5944  			if n >= (len - 2) {
  5945  				break
  5946  			}
  5947  			n = n + (extractToken(tls, (((zScript + uintptr(ii)) + uintptr(2)) + uintptr(n)), ((len - 2) - n),
  5948  				(bp + 410 /* &azArg[0] */ + uintptr(nArg)*100), int32(unsafe.Sizeof([100]int8{}))))
  5949  		}
  5950  		for j = nArg; j < MX_ARG; j++ {
  5951  			*(*int8)(unsafe.Pointer((bp + 410 /* &azArg[0] */ + uintptr(libc.PostIncInt32(&j, 1))*100))) = int8(0)
  5952  		}
  5953  
  5954  		//  --sleep N
  5955  		//
  5956  		// Pause for N milliseconds
  5957  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1207 /* "sleep" */) == 0 {
  5958  			sqlite3.Xsqlite3_sleep(tls, libc.Xatoi(tls, (bp+410 /* &azArg[0] */)))
  5959  		} else
  5960  
  5961  		//   --exit N
  5962  		//
  5963  		// Exit this process.  If N>0 then exit without shutting down
  5964  		// SQLite.  (In other words, simulate a crash.)
  5965  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1213 /* "exit" */) == 0 {
  5966  			var rc int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
  5967  			finishScript(tls, iClient, taskId, 1)
  5968  			if rc == 0 {
  5969  				sqlite3.Xsqlite3_close(tls, g.db)
  5970  			}
  5971  			libc.Xexit(tls, rc)
  5972  		} else
  5973  
  5974  		//   --testcase NAME
  5975  		//
  5976  		// Begin a new test case.  Announce in the log that the test case
  5977  		// has begun.
  5978  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1218 /* "testcase" */) == 0 {
  5979  			if g.iTrace == 1 {
  5980  				logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+32, (len-1), (zScript+uintptr(ii))))
  5981  			}
  5982  			stringReset(tls, bp+360 /* &sResult */)
  5983  		} else
  5984  
  5985  		//   --finish
  5986  		//
  5987  		// Mark the current task as having finished, even if it is not.
  5988  		// This can be used in conjunction with --exit to simulate a crash.
  5989  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1227 /* "finish" */) == 0) && (iClient > 0) {
  5990  			finishScript(tls, iClient, taskId, 1)
  5991  		} else
  5992  
  5993  		//  --reset
  5994  		//
  5995  		// Reset accumulated results back to an empty string
  5996  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1234 /* "reset" */) == 0 {
  5997  			stringReset(tls, bp+360 /* &sResult */)
  5998  		} else
  5999  
  6000  		//  --match ANSWER...
  6001  		//
  6002  		// Check to see if output matches ANSWER.  Report an error if not.
  6003  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1240 /* "match" */) == 0 {
  6004  			var jj int32
  6005  			var zAns uintptr = (zScript + uintptr(ii))
  6006  			for jj = 7; (jj < (len - 1)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj))))))*2))) & int32(_ISspace)) != 0); jj++ {
  6007  			}
  6008  			zAns += uintptr(jj)
  6009  			if (((len - jj) - 1) != (*String)(unsafe.Pointer(bp+360 /* &sResult */)).n) || (libc.Xstrncmp(tls, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z, zAns, (uint64((len-jj)-1))) != 0) {
  6010  				errorMessage(tls, ts+1246, /* "line %d of %s:\nE..." */
  6011  					libc.VaList(bp+48, prevLine, zFilename, ((len-jj)-1), zAns, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
  6012  			}
  6013  			g.nTest++
  6014  			stringReset(tls, bp+360 /* &sResult */)
  6015  		} else
  6016  
  6017  		//  --glob ANSWER...
  6018  		//  --notglob ANSWER....
  6019  		//
  6020  		// Check to see if output does or does not match the glob pattern
  6021  		// ANSWER.
  6022  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1291 /* "glob" */) == 0) || (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1296 /* "notglob" */) == 0) {
  6023  			var jj int32
  6024  			var zAns uintptr = (zScript + uintptr(ii))
  6025  			var zCopy uintptr
  6026  			var isGlob int32 = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(bp + 380 /* &zCmd[0] */))) == 'g'))
  6027  			for jj = (9 - (3 * isGlob)); (jj < (len - 1)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj))))))*2))) & int32(_ISspace)) != 0); jj++ {
  6028  			}
  6029  			zAns += uintptr(jj)
  6030  			zCopy = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+88, ((len-jj)-1), zAns))
  6031  			if ((libc.Bool32(sqlite3.Xsqlite3_strglob(tls, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z) == 0)) ^ isGlob) != 0 {
  6032  				errorMessage(tls, ts+1304, /* "line %d of %s:\nE..." */
  6033  					libc.VaList(bp+104, prevLine, zFilename, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
  6034  			}
  6035  			sqlite3.Xsqlite3_free(tls, zCopy)
  6036  			g.nTest++
  6037  			stringReset(tls, bp+360 /* &sResult */)
  6038  		} else
  6039  
  6040  		//  --output
  6041  		//
  6042  		// Output the result of the previous SQL.
  6043  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1347 /* "output" */) == 0 {
  6044  			logMessage(tls, ts+438 /* "%s" */, libc.VaList(bp+136, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
  6045  		} else
  6046  
  6047  		//  --source FILENAME
  6048  		//
  6049  		// Run a subscript from a separate file.
  6050  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1354 /* "source" */) == 0 {
  6051  			var zNewFile uintptr
  6052  			var zNewScript uintptr
  6053  			var zToDel uintptr = uintptr(0)
  6054  			zNewFile = (bp + 410 /* &azArg[0] */)
  6055  			if !((int32(*(*int8)(unsafe.Pointer(zNewFile)))) == '/') {
  6056  				var k int32
  6057  				for k = (int32(libc.Xstrlen(tls, zFilename)) - 1); (k >= 0) && !((int32(*(*int8)(unsafe.Pointer(zFilename + uintptr(k))))) == '/'); k-- {
  6058  				}
  6059  				if k > 0 {
  6060  					zNewFile = libc.AssignUintptr(&zToDel, sqlite3.Xsqlite3_mprintf(tls, ts+1361 /* "%.*s/%s" */, libc.VaList(bp+144, k, zFilename, zNewFile)))
  6061  				}
  6062  			}
  6063  			zNewScript = readFile(tls, zNewFile)
  6064  			if g.iTrace != 0 {
  6065  				logMessage(tls, ts+1369 /* "begin script [%s..." */, libc.VaList(bp+168, zNewFile))
  6066  			}
  6067  			runScript(tls, 0, 0, zNewScript, zNewFile)
  6068  			sqlite3.Xsqlite3_free(tls, zNewScript)
  6069  			if g.iTrace != 0 {
  6070  				logMessage(tls, ts+1388 /* "end script [%s]\n" */, libc.VaList(bp+176, zNewFile))
  6071  			}
  6072  			sqlite3.Xsqlite3_free(tls, zToDel)
  6073  		} else
  6074  
  6075  		//  --print MESSAGE....
  6076  		//
  6077  		// Output the remainder of the line to the log file
  6078  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1405 /* "print" */) == 0 {
  6079  			var jj int32
  6080  			for jj = 7; (jj < len) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj)))))))*2))) & int32(_ISspace)) != 0); jj++ {
  6081  			}
  6082  			logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+184, (len-jj), ((zScript+uintptr(ii))+uintptr(jj))))
  6083  		} else
  6084  
  6085  		//  --if EXPR
  6086  		//
  6087  		// Skip forward to the next matching --endif or --else if EXPR is false.
  6088  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1411 /* "if" */) == 0 {
  6089  			var jj int32
  6090  			var rc int32
  6091  			var pStmt uintptr
  6092  			for jj = 4; (jj < len) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(libc.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj)))))))*2))) & int32(_ISspace)) != 0); jj++ {
  6093  			}
  6094  			pStmt = prepareSql(tls, ts+1414 /* "SELECT %.*s" */, libc.VaList(bp+200, (len-jj), ((zScript+uintptr(ii))+uintptr(jj))))
  6095  			rc = sqlite3.Xsqlite3_step(tls, pStmt)
  6096  			if (rc != SQLITE_ROW) || (sqlite3.Xsqlite3_column_int(tls, pStmt, 0) == 0) {
  6097  				ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 1, bp+376 /* &lineno */))
  6098  			}
  6099  			sqlite3.Xsqlite3_finalize(tls, pStmt)
  6100  		} else
  6101  
  6102  		//  --else
  6103  		//
  6104  		// This command can only be encountered if currently inside an --if that
  6105  		// is true.  Skip forward to the next matching --endif.
  6106  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1426 /* "else" */) == 0 {
  6107  			ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 0, bp+376 /* &lineno */))
  6108  		} else
  6109  
  6110  		//  --endif
  6111  		//
  6112  		// This command can only be encountered if currently inside an --if that
  6113  		// is true or an --else of a false if.  This is a no-op.
  6114  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1431 /* "endif" */) == 0 {
  6115  			// no-op
  6116  		} else
  6117  
  6118  		//  --start CLIENT
  6119  		//
  6120  		// Start up the given client.
  6121  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1437 /* "start" */) == 0) && (iClient == 0) {
  6122  			var iNewClient int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
  6123  			if iNewClient > 0 {
  6124  				startClient(tls, iNewClient)
  6125  			}
  6126  		} else
  6127  
  6128  		//  --wait CLIENT TIMEOUT
  6129  		//
  6130  		// Wait until all tasks complete for the given client.  If CLIENT is
  6131  		// "all" then wait for all clients to complete.  Wait no longer than
  6132  		// TIMEOUT milliseconds (default 10,000)
  6133  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1443 /* "wait" */) == 0) && (iClient == 0) {
  6134  			var iTimeout int32
  6135  			if nArg >= 2 {
  6136  				iTimeout = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */ + 1*100))
  6137  			} else {
  6138  				iTimeout = 10000
  6139  			}
  6140  			sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+610 /* &zError[0] */, ts+1448, /* "line %d of %s\n" */
  6141  				libc.VaList(bp+216, prevLine, zFilename))
  6142  			waitForClient(tls, libc.Xatoi(tls, (bp+410 /* &azArg[0] */)), iTimeout, bp+610 /* &zError[0] */)
  6143  		} else
  6144  
  6145  		//  --task CLIENT
  6146  		//     <task-content-here>
  6147  		//  --end
  6148  		//
  6149  		// Assign work to a client.  Start the client if it is not running
  6150  		// already.
  6151  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1463 /* "task" */) == 0) && (iClient == 0) {
  6152  			var iTarget int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
  6153  			var iEnd int32
  6154  			var zTask uintptr
  6155  			var zTName uintptr
  6156  			iEnd = findEnd(tls, ((zScript + uintptr(ii)) + uintptr(len)), bp+376 /* &lineno */)
  6157  			if iTarget < 0 {
  6158  				errorMessage(tls, ts+1468, /* "line %d of %s: b..." */
  6159  					libc.VaList(bp+232, prevLine, zFilename, iTarget))
  6160  			} else {
  6161  				zTask = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+256, iEnd, ((zScript+uintptr(ii))+uintptr(len))))
  6162  				if nArg > 1 {
  6163  					zTName = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, libc.VaList(bp+272, (bp+410 /* &azArg[0] */ +1*100)))
  6164  				} else {
  6165  					zTName = sqlite3.Xsqlite3_mprintf(tls, ts+1505 /* "%s:%d" */, libc.VaList(bp+280, filenameTail(tls, zFilename), prevLine))
  6166  				}
  6167  				startClient(tls, iTarget)
  6168  				runSql(tls,
  6169  					ts+1511 /* "INSERT INTO task..." */, libc.VaList(bp+296, iTarget, zTask, zTName))
  6170  				sqlite3.Xsqlite3_free(tls, zTask)
  6171  				sqlite3.Xsqlite3_free(tls, zTName)
  6172  			}
  6173  			iEnd = iEnd + (tokenLength(tls, (((zScript + uintptr(ii)) + uintptr(len)) + uintptr(iEnd)), bp+376 /* &lineno */))
  6174  			len = len + (iEnd)
  6175  			iBegin = (ii + len)
  6176  		} else
  6177  
  6178  		//  --breakpoint
  6179  		//
  6180  		// This command calls "test_breakpoint()" which is a routine provided
  6181  		// as a convenient place to set a debugger breakpoint.
  6182  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1567 /* "breakpoint" */) == 0 {
  6183  			test_breakpoint(tls)
  6184  		} else
  6185  
  6186  		//  --show-sql-errors BOOLEAN
  6187  		//
  6188  		// Turn display of SQL errors on and off.
  6189  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1578 /* "show-sql-errors" */) == 0 {
  6190  			g.bIgnoreSqlErrors = func() int32 {
  6191  				if nArg >= 1 {
  6192  					return libc.BoolInt32(!(booleanValue(tls, (bp+410 /* &azArg[0] */)) != 0))
  6193  				}
  6194  				return 1
  6195  			}()
  6196  		} else {
  6197  			errorMessage(tls, ts+1594, /* "line %d of %s: u..." */
  6198  				libc.VaList(bp+320, prevLine, zFilename, bp+380 /* &zCmd[0] */))
  6199  		}
  6200  		ii = ii + (len)
  6201  	}
  6202  	if iBegin < ii {
  6203  		var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+344, (ii-iBegin), (zScript+uintptr(iBegin))))
  6204  		runSql(tls, zSql, 0)
  6205  		sqlite3.Xsqlite3_free(tls, zSql)
  6206  	}
  6207  	stringFree(tls, bp+360 /* &sResult */)
  6208  }
  6209  
  6210  // Look for a command-line option.  If present, return a pointer.
  6211  // Return NULL if missing.
  6212  //
  6213  // hasArg==0 means the option is a flag.  It is either present or not.
  6214  // hasArg==1 means the option has an argument.  Return a pointer to the
  6215  // argument.
  6216  func findOption(tls *libc.TLS, azArg uintptr, pnArg uintptr, zOption uintptr, hasArg int32) uintptr { /* mptest.c:1201:13: */
  6217  	bp := tls.Alloc(8)
  6218  	defer tls.Free(8)
  6219  
  6220  	var i int32
  6221  	var j int32
  6222  	var zReturn uintptr = uintptr(0)
  6223  	var nArg int32 = *(*int32)(unsafe.Pointer(pnArg))
  6224  
  6225  	for i = 0; i < nArg; i++ {
  6226  		var z uintptr
  6227  		if (i + hasArg) >= nArg {
  6228  			break
  6229  		}
  6230  		z = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))
  6231  		if int32(*(*int8)(unsafe.Pointer(z))) != '-' {
  6232  			continue
  6233  		}
  6234  		z++
  6235  		if int32(*(*int8)(unsafe.Pointer(z))) == '-' {
  6236  			if int32(*(*int8)(unsafe.Pointer(z + 1))) == 0 {
  6237  				break
  6238  			}
  6239  			z++
  6240  		}
  6241  		if libc.Xstrcmp(tls, z, zOption) == 0 {
  6242  			if (hasArg != 0) && (i == (nArg - 1)) {
  6243  				fatalError(tls, ts+1630 /* "command-line opt..." */, libc.VaList(bp, z))
  6244  			}
  6245  			if hasArg != 0 {
  6246  				zReturn = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
  6247  			} else {
  6248  				zReturn = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))
  6249  			}
  6250  			j = ((i + 1) + (libc.Bool32(hasArg != 0)))
  6251  			for j < nArg {
  6252  				*(*uintptr)(unsafe.Pointer(azArg + uintptr(libc.PostIncInt32(&i, 1))*8)) = *(*uintptr)(unsafe.Pointer(azArg + uintptr(libc.PostIncInt32(&j, 1))*8))
  6253  			}
  6254  			*(*int32)(unsafe.Pointer(pnArg)) = i
  6255  			return zReturn
  6256  		}
  6257  	}
  6258  	return zReturn
  6259  }
  6260  
  6261  // Print a usage message for the program and exit
  6262  func usage(tls *libc.TLS, argv0 uintptr) { /* mptest.c:1241:13: */
  6263  	bp := tls.Alloc(8)
  6264  	defer tls.Free(8)
  6265  
  6266  	var i int32
  6267  	var zTail uintptr = argv0
  6268  	for i = 0; *(*int8)(unsafe.Pointer(argv0 + uintptr(i))) != 0; i++ {
  6269  		if (int32(*(*int8)(unsafe.Pointer(argv0 + uintptr(i))))) == '/' {
  6270  			zTail = ((argv0 + uintptr(i)) + uintptr(1))
  6271  		}
  6272  	}
  6273  	libc.Xfprintf(tls, libc.Xstderr, ts+1678 /* "Usage: %s DATABA..." */, libc.VaList(bp, zTail))
  6274  	libc.Xfprintf(tls, libc.Xstderr,
  6275  
  6276  		ts+1717 /* "Options:\n   --er..." */, 0)
  6277  	libc.Xexit(tls, 1)
  6278  }
  6279  
  6280  // Report on unrecognized arguments
  6281  func unrecognizedArguments(tls *libc.TLS, argv0 uintptr, nArg int32, azArg uintptr) { /* mptest.c:1265:13: */
  6282  	bp := tls.Alloc(16)
  6283  	defer tls.Free(16)
  6284  
  6285  	var i int32
  6286  	libc.Xfprintf(tls, libc.Xstderr, ts+2289 /* "%s: unrecognized..." */, libc.VaList(bp, argv0))
  6287  	for i = 0; i < nArg; i++ {
  6288  		libc.Xfprintf(tls, libc.Xstderr, ts+2317 /* " %s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))))
  6289  	}
  6290  	libc.Xfprintf(tls, libc.Xstderr, ts+2321 /* "\n" */, 0)
  6291  	libc.Xexit(tls, 1)
  6292  }
  6293  
  6294  func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: */
  6295  	bp := tls.Alloc(264)
  6296  	defer tls.Free(264)
  6297  
  6298  	var zClient uintptr
  6299  	var iClient int32
  6300  	// var n int32 at bp+232, 4
  6301  
  6302  	var i int32
  6303  	var openFlags int32 = SQLITE_OPEN_READWRITE
  6304  	var rc int32
  6305  	// var zScript uintptr at bp+240, 8
  6306  
  6307  	// var taskId int32 at bp+248, 4
  6308  
  6309  	var zTrace uintptr
  6310  	var zCOption uintptr
  6311  	var zJMode uintptr
  6312  	var zNRep uintptr
  6313  	var nRep int32 = 1
  6314  	var iRep int32
  6315  	var iTmout int32 = 0 // Default: no timeout
  6316  	var zTmout uintptr
  6317  
  6318  	g.argv0 = *(*uintptr)(unsafe.Pointer(argv))
  6319  	g.iTrace = 1
  6320  	if argc < 2 {
  6321  		usage(tls, *(*uintptr)(unsafe.Pointer(argv)))
  6322  	}
  6323  	g.zDbFile = *(*uintptr)(unsafe.Pointer(argv + 1*8))
  6324  	if strglob(tls, ts+2323 /* "*.test" */, g.zDbFile) != 0 {
  6325  		usage(tls, *(*uintptr)(unsafe.Pointer(argv)))
  6326  	}
  6327  	if libc.Xstrcmp(tls, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2021-04-19 18:32..." */) != 0 {
  6328  		libc.Xfprintf(tls, libc.Xstderr,
  6329  
  6330  			ts+2415, /* "SQLite library a..." */
  6331  			libc.VaList(bp, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2021-04-19 18:32..." */))
  6332  		libc.Xexit(tls, 1)
  6333  	}
  6334  	*(*int32)(unsafe.Pointer(bp + 232 /* n */)) = (argc - 2)
  6335  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2475 /* "%05d.mptest" */, libc.VaList(bp+16, libc.Xgetpid(tls)))
  6336  	zJMode = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2487 /* "journalmode" */, 1)
  6337  	zNRep = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2499 /* "repeat" */, 1)
  6338  	if zNRep != 0 {
  6339  		nRep = libc.Xatoi(tls, zNRep)
  6340  	}
  6341  	if nRep < 1 {
  6342  		nRep = 1
  6343  	}
  6344  	g.zVfs = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2506 /* "vfs" */, 1)
  6345  	zClient = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2510 /* "client" */, 1)
  6346  	g.zErrLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2517 /* "errlog" */, 1)
  6347  	g.zLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2524 /* "log" */, 1)
  6348  	zTrace = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2528 /* "trace" */, 1)
  6349  	if zTrace != 0 {
  6350  		g.iTrace = libc.Xatoi(tls, zTrace)
  6351  	}
  6352  	if findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2534 /* "quiet" */, 0) != uintptr(0) {
  6353  		g.iTrace = 0
  6354  	}
  6355  	zTmout = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2540 /* "timeout" */, 1)
  6356  	if zTmout != 0 {
  6357  		iTmout = libc.Xatoi(tls, zTmout)
  6358  	}
  6359  	g.bSqlTrace = (libc.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2548 /* "sqltrace" */, 0) != uintptr(0)))
  6360  	g.bSync = (libc.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2557 /* "sync" */, 0) != uintptr(0)))
  6361  	if g.zErrLog != 0 {
  6362  		g.pErrLog = libc.Xfopen(tls, g.zErrLog, ts+2562 /* "a" */)
  6363  	} else {
  6364  		g.pErrLog = libc.Xstderr
  6365  	}
  6366  	if g.zLog != 0 {
  6367  		g.pLog = libc.Xfopen(tls, g.zLog, ts+2562 /* "a" */)
  6368  	} else {
  6369  		g.pLog = libc.Xstdout
  6370  	}
  6371  
  6372  	sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_LOG, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(&struct {
  6373  		f func(*libc.TLS, uintptr, int32, uintptr)
  6374  	}{sqlErrorCallback})), 0))
  6375  	if zClient != 0 {
  6376  		iClient = libc.Xatoi(tls, zClient)
  6377  		if iClient < 1 {
  6378  			fatalError(tls, ts+2564 /* "illegal client n..." */, libc.VaList(bp+40, iClient))
  6379  		}
  6380  		sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2591, /* "%05d.client%02d" */
  6381  			libc.VaList(bp+48, libc.Xgetpid(tls), iClient))
  6382  	} else {
  6383  		var nTry int32 = 0
  6384  		if g.iTrace > 0 {
  6385  			libc.Xprintf(tls, ts+2607 /* "BEGIN: %s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv))))
  6386  			for i = 1; i < argc; i++ {
  6387  				libc.Xprintf(tls, ts+2317 /* " %s" */, libc.VaList(bp+72, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
  6388  			}
  6389  			libc.Xprintf(tls, ts+2321 /* "\n" */, 0)
  6390  			libc.Xprintf(tls, ts+2617 /* "With SQLite 3.35..." */, 0)
  6391  			for i = 0; (libc.AssignUintptr(&zCOption, sqlite3.Xsqlite3_compileoption_get(tls, i))) != uintptr(0); i++ {
  6392  				libc.Xprintf(tls, ts+2722 /* "-DSQLITE_%s\n" */, libc.VaList(bp+80, zCOption))
  6393  			}
  6394  			libc.Xfflush(tls, libc.Xstdout)
  6395  		}
  6396  		iClient = 0
  6397  		for ok := true; ok; ok = (((rc != 0) && ((libc.PreIncInt32(&nTry, 1)) < 60)) && (sqlite3.Xsqlite3_sleep(tls, 1000) > 0)) {
  6398  			if (nTry % 5) == 4 {
  6399  				libc.Xprintf(tls, ts+2735, /* "... %strying to ..." */
  6400  					libc.VaList(bp+88, func() uintptr {
  6401  						if nTry > 5 {
  6402  							return ts + 2764 /* "still " */
  6403  						}
  6404  						return ts + 1099 /* "" */
  6405  					}(), g.zDbFile))
  6406  			}
  6407  			rc = libc.Xunlink(tls, g.zDbFile)
  6408  			if (rc != 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == ENOENT) {
  6409  				rc = 0
  6410  			}
  6411  		}
  6412  		if rc != 0 {
  6413  			fatalError(tls, ts+2771, /* "unable to unlink..." */
  6414  				libc.VaList(bp+104, g.zDbFile, nTry))
  6415  		}
  6416  		openFlags = openFlags | (SQLITE_OPEN_CREATE)
  6417  	}
  6418  	rc = sqlite3.Xsqlite3_open_v2(tls, g.zDbFile, (uintptr(unsafe.Pointer(&g)) + 24 /* &.db */), openFlags, g.zVfs)
  6419  	if rc != 0 {
  6420  		fatalError(tls, ts+2812 /* "cannot open [%s]" */, libc.VaList(bp+120, g.zDbFile))
  6421  	}
  6422  	if iTmout > 0 {
  6423  		sqlite3.Xsqlite3_busy_timeout(tls, g.db, iTmout)
  6424  	}
  6425  
  6426  	if zJMode != 0 {
  6427  		runSql(tls, ts+2829 /* "PRAGMA journal_m..." */, libc.VaList(bp+128, zJMode))
  6428  	}
  6429  	if !(g.bSync != 0) {
  6430  		trySql(tls, ts+2853 /* "PRAGMA synchrono..." */, 0)
  6431  	}
  6432  	sqlite3.Xsqlite3_enable_load_extension(tls, g.db, 1)
  6433  	sqlite3.Xsqlite3_busy_handler(tls, g.db, *(*uintptr)(unsafe.Pointer(&struct {
  6434  		f func(*libc.TLS, uintptr, int32) int32
  6435  	}{busyHandler})), uintptr(0))
  6436  	sqlite3.Xsqlite3_create_function(tls, g.db, ts+2876 /* "vfsname" */, 0, SQLITE_UTF8, uintptr(0),
  6437  		*(*uintptr)(unsafe.Pointer(&struct {
  6438  			f func(*libc.TLS, uintptr, int32, uintptr)
  6439  		}{vfsNameFunc})), uintptr(0), uintptr(0))
  6440  	sqlite3.Xsqlite3_create_function(tls, g.db, ts+2884 /* "eval" */, 1, SQLITE_UTF8, uintptr(0),
  6441  		*(*uintptr)(unsafe.Pointer(&struct {
  6442  			f func(*libc.TLS, uintptr, int32, uintptr)
  6443  		}{evalFunc})), uintptr(0), uintptr(0))
  6444  	g.iTimeout = DEFAULT_TIMEOUT
  6445  	if g.bSqlTrace != 0 {
  6446  		sqlite3.Xsqlite3_trace(tls, g.db, *(*uintptr)(unsafe.Pointer(&struct {
  6447  			f func(*libc.TLS, uintptr, uintptr)
  6448  		}{sqlTraceCallback})), uintptr(0))
  6449  	}
  6450  	if iClient > 0 {
  6451  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) > 0 {
  6452  			unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8))
  6453  		}
  6454  		if g.iTrace != 0 {
  6455  			logMessage(tls, ts+2889 /* "start-client" */, 0)
  6456  		}
  6457  		for 1 != 0 {
  6458  			*(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)) = uintptr(0)
  6459  			rc = startScript(tls, iClient, bp+240 /* &zScript */, bp+248 /* &taskId */, bp+256 /* &zTaskName */)
  6460  			if rc == SQLITE_DONE {
  6461  				break
  6462  			}
  6463  			if g.iTrace != 0 {
  6464  				logMessage(tls, ts+2902 /* "begin %s (%d)" */, libc.VaList(bp+136, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */))))
  6465  			}
  6466  			runScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)))
  6467  			if g.iTrace != 0 {
  6468  				logMessage(tls, ts+2916 /* "end %s (%d)" */, libc.VaList(bp+152, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */))))
  6469  			}
  6470  			finishScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), 0)
  6471  			sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)))
  6472  			sqlite3.Xsqlite3_sleep(tls, 10)
  6473  		}
  6474  		if g.iTrace != 0 {
  6475  			logMessage(tls, ts+2928 /* "end-client" */, 0)
  6476  		}
  6477  	} else {
  6478  		var pStmt uintptr
  6479  		var iTimeout int32
  6480  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) == 0 {
  6481  			fatalError(tls, ts+2939 /* "missing script f..." */, 0)
  6482  		}
  6483  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) > 1 {
  6484  			unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8))
  6485  		}
  6486  		runSql(tls,
  6487  
  6488  			ts+2963 /* "DROP TABLE IF EX..." */, 0)
  6489  		*(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)) = readFile(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
  6490  		for iRep = 1; iRep <= nRep; iRep++ {
  6491  			if g.iTrace != 0 {
  6492  				logMessage(tls, ts+3399 /* "begin script [%s..." */, libc.VaList(bp+168, *(*uintptr)(unsafe.Pointer(argv + 2*8)), iRep))
  6493  			}
  6494  			runScript(tls, 0, 0, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)))
  6495  			if g.iTrace != 0 {
  6496  				logMessage(tls, ts+3427 /* "end script [%s] ..." */, libc.VaList(bp+184, *(*uintptr)(unsafe.Pointer(argv + 2*8)), iRep))
  6497  			}
  6498  		}
  6499  		sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)))
  6500  		waitForClient(tls, 0, 2000, ts+3453 /* "during shutdown...." */)
  6501  		trySql(tls, ts+3473 /* "UPDATE client SE..." */, 0)
  6502  		sqlite3.Xsqlite3_sleep(tls, 10)
  6503  		g.iTimeout = 0
  6504  		iTimeout = 1000
  6505  		for (((libc.AssignInt32(&rc, trySql(tls, ts+3502 /* "SELECT 1 FROM cl..." */, 0))) == SQLITE_BUSY) ||
  6506  			(rc == SQLITE_ROW)) && (iTimeout > 0) {
  6507  			sqlite3.Xsqlite3_sleep(tls, 10)
  6508  			iTimeout = iTimeout - (10)
  6509  		}
  6510  		sqlite3.Xsqlite3_sleep(tls, 100)
  6511  		pStmt = prepareSql(tls, ts+3523 /* "SELECT nError, n..." */, 0)
  6512  		iTimeout = 1000
  6513  		for ((libc.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == SQLITE_BUSY) && (iTimeout > 0) {
  6514  			sqlite3.Xsqlite3_sleep(tls, 10)
  6515  			iTimeout = iTimeout - (10)
  6516  		}
  6517  		if rc == SQLITE_ROW {
  6518  			*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&g)) + 112 /* &.nError */)) += (sqlite3.Xsqlite3_column_int(tls, pStmt, 0))
  6519  			*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&g)) + 116 /* &.nTest */)) += (sqlite3.Xsqlite3_column_int(tls, pStmt, 1))
  6520  		}
  6521  		sqlite3.Xsqlite3_finalize(tls, pStmt)
  6522  	}
  6523  	sqlite3.Xsqlite3_close(tls, g.db)
  6524  	maybeClose(tls, g.pLog)
  6525  	maybeClose(tls, g.pErrLog)
  6526  	if iClient == 0 {
  6527  		libc.Xprintf(tls, ts+3558 /* "Summary: %d erro..." */, libc.VaList(bp+200, g.nError, g.nTest))
  6528  		libc.Xprintf(tls, ts+3594 /* "END: %s" */, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(argv))))
  6529  		for i = 1; i < argc; i++ {
  6530  			libc.Xprintf(tls, ts+2317 /* " %s" */, libc.VaList(bp+224, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
  6531  		}
  6532  		libc.Xprintf(tls, ts+2321 /* "\n" */, 0)
  6533  	}
  6534  	return (libc.Bool32(g.nError > 0))
  6535  }
  6536  
  6537  var ts1 = "%s%.*s\n\x00%s:ERROR: \x00%s:FATAL: \x00UPDATE client SET wantHalt=1;\x00%s: \x00main\x00timeout after %dms\x00[%.*s]\x00(info) %s\x00(errcode=%d) %s\x00%s\n%s\n\x00out of memory\x00 \x00nil\x00'\x00error(%d)\x00BEGIN IMMEDIATE\x00in startScript: %s\x00UPDATE counters SET nError=nError+%d, nTest=nTest+%d\x00SELECT 1 FROM client WHERE id=%d AND wantHalt\x00DELETE FROM client WHERE id=%d\x00COMMIT TRANSACTION;\x00SELECT script, id, name FROM task WHERE client=%d AND starttime IS NULL ORDER BY id LIMIT 1\x00%s\x00UPDATE task   SET starttime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00Waited over 30 seconds with no work.  Giving up.\x00DELETE FROM client WHERE id=%d; COMMIT;\x00COMMIT\x00UPDATE task   SET endtime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00INSERT OR IGNORE INTO client VALUES(%d,0)\x00%s \"%s\" --client %d --trace %d\x00%z --sqltrace\x00%z --sync\x00%z --vfs \"%s\"\x00system('%q')\x00%z &\x00system() fails with error code %d\x00rb\x00cannot open \"%s\" for reading\x00--end\x00--endif\x00--else\x00--if\x00SELECT 1 FROM task WHERE client=%d   AND client IN (SELECT id FROM client)  AND endtime IS NULL\x00SELECT 1 FROM task WHERE client IN (SELECT id FROM client)   AND endtime IS NULL\x00\x00%stimeout waiting for client %d\x00%stimeout waiting for all clients\x00on\x00yes\x00off\x00no\x00unknown boolean: [%s]\x00%.*s\x00sleep\x00exit\x00testcase\x00finish\x00reset\x00match\x00line %d of %s:\nExpected [%.*s]\n     Got [%s]\x00glob\x00notglob\x00line %d of %s:\nExpected [%s]\n     Got [%s]\x00output\x00source\x00%.*s/%s\x00begin script [%s]\n\x00end script [%s]\n\x00print\x00if\x00SELECT %.*s\x00else\x00endif\x00start\x00wait\x00line %d of %s\n\x00task\x00line %d of %s: bad client number: %d\x00%s:%d\x00INSERT INTO task(client,script,name) VALUES(%d,'%q',%Q)\x00breakpoint\x00show-sql-errors\x00line %d of %s: unknown command --%s\x00command-line option \"--%s\" requires an argument\x00Usage: %s DATABASE ?OPTIONS? ?SCRIPT?\n\x00Options:\n   --errlog FILENAME           Write errors to FILENAME\n   --journalmode MODE          Use MODE as the journal_mode\n   --log FILENAME              Log messages to FILENAME\n   --quiet                     Suppress unnecessary output\n   --vfs NAME                  Use NAME as the VFS\n   --repeat N                  Repeat the test N times\n   --sqltrace                  Enable SQL tracing\n   --sync                      Enable synchronous disk writes\n   --timeout MILLISEC          Busy timeout is MILLISEC\n   --trace BOOLEAN             Enable or disable tracing\n\x00%s: unrecognized arguments:\x00 %s\x00\n\x00*.test\x002021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886\x00SQLite library and header mismatch\nLibrary: %s\nHeader:  %s\n\x00%05d.mptest\x00journalmode\x00repeat\x00vfs\x00client\x00errlog\x00log\x00trace\x00quiet\x00timeout\x00sqltrace\x00sync\x00a\x00illegal client number: %d\n\x00%05d.client%02d\x00BEGIN: %s\x00With SQLite 3.35.5 2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886\n\x00-DSQLITE_%s\n\x00... %strying to unlink '%s'\n\x00still \x00unable to unlink '%s' after %d attempts\n\x00cannot open [%s]\x00PRAGMA journal_mode=%Q;\x00PRAGMA synchronous=OFF\x00vfsname\x00eval\x00start-client\x00begin %s (%d)\x00end %s (%d)\x00end-client\x00missing script filename\x00DROP TABLE IF EXISTS task;\nDROP TABLE IF EXISTS counters;\nDROP TABLE IF EXISTS client;\nCREATE TABLE task(\n  id INTEGER PRIMARY KEY,\n  name TEXT,\n  client INTEGER,\n  starttime DATE,\n  endtime DATE,\n  script TEXT\n);CREATE INDEX task_i1 ON task(client, starttime);\nCREATE INDEX task_i2 ON task(client, endtime);\nCREATE TABLE counters(nError,nTest);\nINSERT INTO counters VALUES(0,0);\nCREATE TABLE client(id INTEGER PRIMARY KEY, wantHalt);\n\x00begin script [%s] cycle %d\n\x00end script [%s] cycle %d\n\x00during shutdown...\n\x00UPDATE client SET wantHalt=1\x00SELECT 1 FROM client\x00SELECT nError, nTest FROM counters\x00Summary: %d errors out of %d tests\n\x00END: %s\x00"
  6538  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data