MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / wmain

Function wmain

modules/dasSQLITE/sqlite/shell.c:26952–27547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26950int SQLITE_CDECL main(int argc, char **argv){
26951#else
26952int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
26953 char **argv;
26954#endif
26955#ifdef SQLITE_DEBUG
26956 sqlite3_int64 mem_main_enter = sqlite3_memory_used();
26957#endif
26958 char *zErrMsg = 0;
26959#ifdef SQLITE_SHELL_FIDDLE
26960# define data shellState
26961#else
26962 ShellState data;
26963#endif
26964 const char *zInitFile = 0;
26965 int i;
26966 int rc = 0;
26967 int warnInmemoryDb = 0;
26968 int readStdin = 1;
26969 int nCmd = 0;
26970 char **azCmd = 0;
26971 const char *zVfs = 0; /* Value of -vfs command-line option */
26972#if !SQLITE_SHELL_IS_UTF8
26973 char **argvToFree = 0;
26974 int argcToFree = 0;
26975#endif
26976
26977 setBinaryMode(stdin, 0);
26978 setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */
26979#ifdef SQLITE_SHELL_FIDDLE
26980 stdin_is_interactive = 0;
26981 stdout_is_console = 1;
26982 data.wasm.zDefaultDbName = "/fiddle.sqlite3";
26983#else
26984 stdin_is_interactive = isatty(0);
26985 stdout_is_console = isatty(1);
26986#endif
26987
26988#if !defined(_WIN32_WCE)
26989 if( getenv("SQLITE_DEBUG_BREAK") ){
26990 if( isatty(0) && isatty(2) ){
26991 fprintf(stderr,
26992 "attach debugger to process %d and press any key to continue.\n",
26993 GETPID());
26994 fgetc(stdin);
26995 }else{
26996#if defined(_WIN32) || defined(WIN32)
26997#if SQLITE_OS_WINRT
26998 __debugbreak();
26999#else
27000 DebugBreak();
27001#endif
27002#elif defined(SIGTRAP)
27003 raise(SIGTRAP);
27004#endif
27005 }
27006 }
27007#endif
27008
27009#if USE_SYSTEM_SQLITE+0!=1

Callers

nothing calls this directly

Calls 15

setBinaryModeFunction · 0.85
fprintfFunction · 0.85
cli_strncmpFunction · 0.85
utf8_printfFunction · 0.85
main_initFunction · 0.85
shell_check_oomFunction · 0.85
assertFunction · 0.85
verify_uninitializedFunction · 0.85
cli_strcmpFunction · 0.85
cmdline_option_valueFunction · 0.85
integerValueFunction · 0.85
sqlite3MemTraceActivateFunction · 0.85

Tested by

no test coverage detected