1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add an fputs() equivalent to console I/O lib, and use in CLI.

FossilOrigin-Name: d661f90724b1bd31948169841bacb80ba4ae91b52191a0b0021a89a22d932a02
This commit is contained in:
larrybr
2023-11-06 13:24:07 +00:00
parent e3a6a60901
commit 56fba47850
5 changed files with 228 additions and 210 deletions

View File

@@ -1,5 +1,5 @@
C Cause\sCLI\sto\suse\sconsole_io\slibrary.
D 2023-11-06T03:09:10.820
C Add\san\sfputs()\sequivalent\sto\sconsole\sI/O\slib,\sand\suse\sin\sCLI.
D 2023-11-06T13:24:07.790
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 54dfcb0c76e946a1b96d819e4f4b64b16e7c5e6a12b002206531b487ec0af5a0 x
F src/console_io.h df286a858032fb626a7eb339ce0ab5d50b5387c2075536f602f9625d73215e7e
F src/console_io.c 6bc9b7f00dd29873519f650e52de974d811c9c36c3a2914fb65d8764c6fbabeb x
F src/console_io.h cf7a58e120603a16ea15cf5f32a5aa3012ee2def26a610b763009d3b266d15ad
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 86d63996bc534872d20978b1a85d1f8bb20c84d4087c4abae2e7a35f840b93a9
F src/shell.c.in 18440bb3296508bc92673c10e4293c97aa11bc3d3a6bb0ed0c16c0c73b6ec558
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 bb278d2496b27d2e2ee3cedd6fc54394e71ab2ba5d3d51593f97e897b8b306a4
R 1fc68e9eabc68f8f7161c78d8df5cb64
P bf66a7c1d330b04fd3c3e50f43ebe1e41307db59d7189798acafb3de77e0c8b2
R 873651c11fd34fdadd7d1e7335c5cb89
U larrybr
Z ceef29f2dca26d535bb75e96dff32841
Z 556f0a6b391897986638a1109b2be8a2
# Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
bf66a7c1d330b04fd3c3e50f43ebe1e41307db59d7189798acafb3de77e0c8b2
d661f90724b1bd31948169841bacb80ba4ae91b52191a0b0021a89a22d932a02

View File

@@ -255,6 +255,13 @@ INT_LINKAGE int fprintfUtf8(FILE *pfO, const char *zFormat, ...){
return rv;
}
INT_LINKAGE int fputsUtf8(const char *z, FILE *pfO){
#if SHELL_CON_TRANSLATE
return fprintfUtf8(pfO, "%s", z);
#else
return fputs(z, pfO);
#endif
}
INT_LINKAGE char* fgetsUtf8(char *cBuf, int ncMax, FILE *pfIn){
if( pfIn==0 ) pfIn = stdin;

View File

@@ -99,6 +99,15 @@ INT_LINKAGE void SQLITE_CDECL consoleRestore( void );
*/
INT_LINKAGE int fprintfUtf8(FILE *pfO, const char *zFormat, ...);
/*
** Render output like fputs(). If the output is going to the
** console and translation from UTF-8 is necessary, perform
** the needed translation. Otherwise, write given text to the
** provided stream almost as-is, possibly with newline
** translation as specified by set{Binary,Text}Mode().
*/
INT_LINKAGE int fputsUtf8(const char *z, FILE *pfO);
/*
** Collect input like fgets(...) with special provisions for input
** from the console on platforms that require same. Defers to the

File diff suppressed because it is too large Load Diff