Cause CLI to use console_io library.

FossilOrigin-Name: bf66a7c1d330b04fd3c3e50f43ebe1e41307db59d7189798acafb3de77e0c8b2
This commit is contained in:
larrybr 2023-11-06 03:09:10 +00:00
parent a0cd392979
commit e3a6a60901
5 changed files with 254 additions and 544 deletions

View File

@ -1,5 +1,5 @@
C Make\sMSVC\saccept\sit,\stoo.\s(Cannot\suse\sstatic\sconst\sint\sas\spart\sof\sa\sconstant\sexpression?)
D 2023-11-06T00:15:14.079
C Cause\sCLI\sto\suse\sconsole_io\slibrary.
D 2023-11-06T03:09:10.820
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -669,8 +669,8 @@ F src/btreeInt.h ef12a72b708677e48d6bc8dcd66fed25434740568b89e2cfa368093cfc5b9d1
F src/build.c 189e4517d67f09f0a3e0d8e1faa6e2ef0c2e95f6ac82e33c912cb7efa2a359cc
F src/callback.c db3a45e376deff6a16c0058163fe0ae2b73a2945f3f408ca32cf74960b28d490
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/console_io.c f1d63f8fd12236fb2e7d57dee3fd4f068c881649b267e716804da84ae1672b31 x
F src/console_io.h 88b5376f02550b03a0d0f44e71fe6b8dccc025b33f7822780fed9cfe58961fe3
F src/console_io.c 54dfcb0c76e946a1b96d819e4f4b64b16e7c5e6a12b002206531b487ec0af5a0 x
F src/console_io.h df286a858032fb626a7eb339ce0ab5d50b5387c2075536f602f9625d73215e7e
F src/ctime.c 23331529e654be40ca97d171cbbffe9b3d4c71cc53b78fe5501230675952da8b
F src/date.c eebc54a00e888d3c56147779e9f361b77d62fd69ff2008c5373946aa1ba1d574
F src/dbpage.c 80e46e1df623ec40486da7a5086cb723b0275a6e2a7b01d9f9b5da0f04ba2782
@ -727,7 +727,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c d017bad7ba8e778617701a0e986fdeb393d67d6afa84fb28ef4e8b8ad2acf916
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c a19daa26e95f7245106a31f288b2f50c72d1f2cc156703f04c8c91450e111515
F src/shell.c.in aebfbedaa7706d2c73ab7366a19fc8bc40ea68b70d2529f7feef54e6eb077ea2
F src/shell.c.in 86d63996bc534872d20978b1a85d1f8bb20c84d4087c4abae2e7a35f840b93a9
F src/sqlite.h.in ef0e41e83ad1ac0dcc9ec9939bf541a44b1c5de821bee2d6c61754c3252f3276
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@ -2144,8 +2144,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 2b850aca1e76805a0358064318a765fa66ce394d015936fd47683d74ca4c187e
R 93fbedf6374d1b71d34353b4143eaca1
P bb278d2496b27d2e2ee3cedd6fc54394e71ab2ba5d3d51593f97e897b8b306a4
R 1fc68e9eabc68f8f7161c78d8df5cb64
U larrybr
Z f691c4a528e1fad9be92f83414b324ea
Z ceef29f2dca26d535bb75e96dff32841
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
bb278d2496b27d2e2ee3cedd6fc54394e71ab2ba5d3d51593f97e897b8b306a4
bf66a7c1d330b04fd3c3e50f43ebe1e41307db59d7189798acafb3de77e0c8b2

View File

@ -17,21 +17,27 @@
# define SQLITE_CDECL
#endif
#ifndef SHELL_NO_SYSINC
#include <stdarg.h>
#include <string.h>
#include "console_io.h"
#include "sqlite3.h"
#endif
#if defined(_WIN32) || defined(WIN32)
# include <io.h>
# include <fcntl.h>
# ifndef SHELL_NO_SYSINC
# include <io.h>
# include <fcntl.h>
# endif
# ifdef SHELL_LEGACY_CONSOLE_IO
# define SHELL_CON_TRANSLATE 2 /* Use UTF-8/MBCS translation for console I/O */
# else
# define SHELL_CON_TRANSLATE 1 /* Use WCHAR Windows APIs for console I/O */
# endif
#else
# include <unistd.h>
# ifndef SHELL_NO_SYSINC
# include <unistd.h>
# endif
# define SHELL_CON_TRANSLATE 0 /* Use plain C library stream I/O at console */
#endif
@ -215,7 +221,7 @@ INT_LINKAGE int fprintfUtf8(FILE *pfO, const char *zFormat, ...){
/* Legacy translation to active code page, then MBCS chars out. */
char *z2 = sqlite3_win32_utf8_to_mbcs_v2(z1, 0);
if( z2!=NULL ){
rv = strlen(z2);
rv = (int)strlen(z2);
vfprintf(pfO, "%s", z2);
sqlite3_free(z2);
}
@ -224,7 +230,7 @@ INT_LINKAGE int fprintfUtf8(FILE *pfO, const char *zFormat, ...){
if( z1!=NULL ){
int nwc;
WCHAR *zw2 = 0;
rv = strlen(z1);
rv = (int)strlen(z1);
nwc = MultiByteToWideChar(CP_UTF8,0,z1,rv,0,0);
if( nwc>0 ){
zw2 = sqlite3_malloc64((nwc+1)*sizeof(WCHAR));

View File

@ -36,6 +36,8 @@
# include <io.h>
# include <fcntl.h>
# endif
#else
# define SHELL_NO_SYSINC /* Better yet, modify mkshellc.tcl for this. */
#endif
#ifndef SQLITE3_H

File diff suppressed because it is too large Load Diff