MCPcopy Create free account
hub / github.com/Kitware/VTK / wmain

Function wmain

ThirdParty/sqlite/vtksqlite/shell.c:32575–33227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32573int SQLITE_CDECL main(int argc, char **argv){
32574#else
32575int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
32576 char **argv;
32577#endif
32578#ifdef SQLITE_DEBUG
32579 sqlite3_int64 mem_main_enter = 0;
32580#endif
32581 char *zErrMsg = 0;
32582#ifdef SQLITE_SHELL_FIDDLE
32583# define data shellState
32584#else
32585 ShellState data;
32586#endif
32587 const char *zInitFile = 0;
32588 int i;
32589 int rc = 0;
32590 int warnInmemoryDb = 0;
32591 int readStdin = 1;
32592 int nCmd = 0;
32593 int nOptsEnd = argc;
32594 int bEnableVfstrace = 0;
32595 char **azCmd = 0;
32596 const char *zVfs = 0; /* Value of -vfs command-line option */
32597#if !SQLITE_SHELL_IS_UTF8
32598 char **argvToFree = 0;
32599 int argcToFree = 0;
32600#endif
32601 setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */
32602
32603#ifdef SQLITE_SHELL_FIDDLE
32604 stdin_is_interactive = 0;
32605 stdout_is_console = 1;
32606 data.wasm.zDefaultDbName = "/fiddle.sqlite3";
32607#else
32608 stdin_is_interactive = isatty(0);
32609 stdout_is_console = isatty(1);
32610#endif
32611 atexit(sayAbnormalExit);
32612#ifdef SQLITE_DEBUG
32613 mem_main_enter = sqlite3_memory_used();
32614#endif
32615#if !defined(_WIN32_WCE)
32616 if( getenv("SQLITE_DEBUG_BREAK") ){
32617 if( isatty(0) && isatty(2) ){
32618 char zLine[100];
32619 sqlite3_fprintf(stderr,
32620 "attach debugger to process %d and press ENTER to continue...",
32621 GETPID());
32622 if( sqlite3_fgets(zLine, sizeof(zLine), stdin)!=0
32623 && cli_strcmp(zLine,"stop")==0
32624 ){
32625 exit(1);
32626 }
32627 }else{
32628#if defined(_WIN32) || defined(WIN32)
32629#if SQLITE_OS_WINRT
32630 __debugbreak();
32631#else
32632 DebugBreak();

Callers

nothing calls this directly

Calls 15

sqlite3_fprintfFunction · 0.85
sqlite3_fgetsFunction · 0.85
cli_strcmpFunction · 0.85
cli_strncmpFunction · 0.85
main_initFunction · 0.85
shell_check_oomFunction · 0.85
verify_uninitializedFunction · 0.85
cmdline_option_valueFunction · 0.85
integerValueFunction · 0.85
vfstrace_registerFunction · 0.85
sqlite3MemTraceActivateFunction · 0.85

Tested by

no test coverage detected