-C Cure\sCLI\sdouble-prompting\s(by\sditching\sgcc\sfgetws()),\sgeneral\scleanup.\sWork\sremaining\sis\sto\savoid\seffect\sof\s-utf8\swhen\sa\sline\seditor\sis\slinked/used\sas\spart\sof\sCLI.
-D 2023-04-14T19:56:32.111
+C Set\sCLI\s-utf8\soption\sand\sbuild\swith\sline-editing\spackage\sto\sbe\smutually\sexclusive.\sIntegration\sof\sconsole-invasive\sUTF-8\shandling\swith\sline-editing\stakeover\sof\sconsole\smay\scome\slater.
+D 2023-04-14T21:23:08.731
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/resolve.c 3e53e02ce87c9582bd7e7d22f13f4094a271678d9dc72820fa257a2abb5e4032
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c 93bb02212256b49a90589a4664031896e2b2991198153dff1a33a72f437dad94
-F src/shell.c.in 23c6ed8477303108f53ec73c8333aaff8d11267276f3852597304d8915bc55d7
+F src/shell.c.in 48ca1d8461e3f39bc10b7a4600a4e6770e83af5c22c97f6a6cbeb72cc073fdbb
F src/sqlite.h.in 4fff9c6cc5d4cbba9532a668112efb6dc469c425e1a2196664d7c07d508363ef
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P b4fa233d3dda54fa83771844cf5156bf1275c687925340af17a7713a9400dfef
-R c50b2d60063b3025d3b72bba985f6bbb
+P 73a5f54231e9f6ad8f013df3987ea48c516080f9193ed873b56f982ee75658c2
+R 6cbccd65b09f7c37b3a15e7a5991ab63
U larrybr
-Z 16fa3e5dbb2e04c40e7812c85b6fd381
+Z d6006bc3d1035c124212e23fa4c9f69b
# Remove this line to create a well-formed Fossil manifest.
*/
static int stdin_is_interactive = 1;
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if (defined(_WIN32) || defined(WIN32)) && SHELL_USE_LOCAL_GETLINE
+# define SHELL_WIN_UTF8_OPT 1
+#else
+# define SHELL_WIN_UTF8_OPT 0
+#endif
+
+#if SHELL_WIN_UTF8_OPT
/*
** Setup console for UTF-8 input/output when following variable true.
*/
}
#endif /* !defined(SQLITE_OMIT_DYNAPROMPT) */
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if SHELL_WIN_UTF8_OPT
/* Following variables are used for -utf8 operation. */
static int stdinEof = 0; /* EOF seen on console input */
static int infsMode; /* Input file stream mode upon shell start */
}
# define fgets(b,n,f) utf8_fgets(b,n,f)
-#endif /* (defined(_WIN32)||defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE) */
+#endif /* SHELL_WIN_UTF8_OPT */
/*
** Render output like fprintf(). Except, if the output is going to the
/* For interactive input on Windows systems, without -utf8,
** translate the multi-byte characterset characters into UTF-8.
** This is the translation that predates the -utf8 option. */
- if( stdin_is_interactive && in==stdin && !console_utf8 ){
+ if( stdin_is_interactive && in==stdin
+# if SHELL_WIN_UTF8_OPT
+ && !console_utf8
+# endif /* SHELL_WIN_UTF8_OPT */
+ ){
char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
if( zTrans ){
i64 nTrans = strlen(zTrans)+1;
" -stats print memory stats before each finalize\n"
" -table set output mode to 'table'\n"
" -tabs set output mode to 'tabs'\n"
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if SHELL_WIN_UTF8_OPT
" -utf8 setup interactive console code page for UTF-8\n"
#endif
" -version show SQLite version\n"
stdin_is_interactive = isatty(0);
stdout_is_console = isatty(1);
#endif
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if SHELL_WIN_UTF8_OPT
atexit(instream_restore); /* Needs revision for CLI as library call */
#endif
#ifdef SQLITE_DEBUG
}else if( cli_strcmp(z,"-batch")==0 ){
stdin_is_interactive = 0;
}else if( cli_strcmp(z,"-utf8")==0 ){
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if SHELL_WIN_UTF8_OPT
console_utf8 = 1;
-#endif
+#endif /* SHELL_WIN_UTF8_OPT */
}else if( cli_strcmp(z,"-heap")==0 ){
i++;
}else if( cli_strcmp(z,"-pagecache")==0 ){
}
data.cMode = data.mode;
}
-#if (defined(_WIN32) || defined(WIN32)) && !defined(SQLITE_SHELL_FIDDLE)
+#if SHELL_WIN_UTF8_OPT
if( console_utf8 && stdin_is_interactive ){
instream_prepare();
}else{