Enhance sqlite3_analyzer.exe so that it uses the ext/consio extension.
FossilOrigin-Name: 769de0b98e136e4a0945b80216d0c9583c1ccd9de69cb0494875c2300e172646
This commit is contained in:
parent
4167033eaf
commit
6db9206c18
@ -2550,7 +2550,7 @@ smoketest: $(TESTPROGS)
|
||||
shelltest: $(TESTPROGS)
|
||||
.\testfixture.exe $(TOP)\test\permutations.test shell
|
||||
|
||||
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(SQLITE_TCL_DEP)
|
||||
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(TOP)\ext\consio\console_io.h $(TOP)\ext\consio\console_io.c $(SQLITE_TCL_DEP)
|
||||
$(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
|
||||
|
||||
sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
|
||||
|
@ -24,9 +24,11 @@
|
||||
# include <stdlib.h>
|
||||
# include <limits.h>
|
||||
# include <assert.h>
|
||||
# include "console_io.h"
|
||||
# include "sqlite3.h"
|
||||
#endif
|
||||
#ifndef HAVE_CONSOLE_IO_H
|
||||
# include "console_io.h"
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_CIO_NO_TRANSLATE
|
||||
# if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT
|
||||
|
@ -28,7 +28,7 @@
|
||||
** CIO_WIN_WC_XLATE is defined as 0 or 1, reflecting whether console I/O
|
||||
** translation for Windows is effected for the build.
|
||||
*/
|
||||
|
||||
#define HAVE_CONSOLE_IO_H 1
|
||||
#ifndef SQLITE_INTERNAL_LINKAGE
|
||||
# define SQLITE_INTERNAL_LINKAGE extern /* external to translation unit */
|
||||
# include <stdio.h>
|
||||
|
18
manifest
18
manifest
@ -1,11 +1,11 @@
|
||||
C Update\sthe\ssqldiff.exe\sutility\sprogram\sso\sthat\sit\suses\sthe\ssqlite3_str\nstring\sinterface,\sand\sso\sthat\sit\sdoes\sconsole\soutput\susing\sthe\next/consio\sextension.
|
||||
D 2024-01-03T12:26:02.221
|
||||
C Enhance\ssqlite3_analyzer.exe\sso\sthat\sit\suses\sthe\sext/consio\sextension.
|
||||
D 2024-01-03T14:13:27.590
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in 24be65ae641c5727bbc247d60286a15ecc24fb80f14f8fb2d32533bf0ec96e79
|
||||
F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6
|
||||
F Makefile.msc 8d4860af68385187806e16757bcbca0b852a7ae1f0618fa2eb42fe51166c5bb6
|
||||
F Makefile.msc df56c06ef05add5ebcdcc9d4823fb2ec66ac16b06acb6971a7420859025886fa
|
||||
F README.md 6358805260a03ebead84e168bbf3740ddf3f683b477e478567186aa7afb490d3
|
||||
F VERSION 73573d4545343f001bf5dc5461173a7c78c203dd046cabcf99153878cf25d3a6
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
@ -51,8 +51,8 @@ F ext/README.md fd5f78013b0a2bc6f0067afb19e6ad040e89a10179b4f6f03eee58fac5f169bd
|
||||
F ext/async/README.txt e12275968f6fde133a80e04387d0e839b0c51f91
|
||||
F ext/async/sqlite3async.c 6f247666b495c477628dd19364d279c78ea48cd90c72d9f9b98ad1aff3294f94
|
||||
F ext/async/sqlite3async.h 46b47c79357b97ad85d20d2795942c0020dc20c532114a49808287f04aa5309a
|
||||
F ext/consio/console_io.c 097323f60037d70523421f0248958d2280851f8ff2f9a443d4ee1474c4769118 x
|
||||
F ext/consio/console_io.h 3228dff1717481202a24f6dcf45ce0b75e7a778bf6877089518a44e1473b76a3
|
||||
F ext/consio/console_io.c e1be639e79e54264b3ae97ca291728987a9aa82e6a4526458e6400f5e083e524 x
|
||||
F ext/consio/console_io.h 0548b83d7c4b7270ad544a67f2bb90cebc519637fa39b1838df4744cf0d87646
|
||||
F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
|
||||
F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4
|
||||
F ext/expert/expert1.test 0dd5cb096d66bed593e33053a3b364f6ef52ed72064bf5cf298364636dbf3cd6
|
||||
@ -2118,7 +2118,7 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
|
||||
F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d40618 x
|
||||
F tool/split-sqlite3c.tcl 5aa60643afca558bc732b1444ae81a522326f91e1dc5665b369c54f09e20de60
|
||||
F tool/sqldiff.c 985452ffc8554baee0f945d078859d393a22abc0bbf553a9f12acae1b6e1fdd0
|
||||
F tool/sqlite3_analyzer.c.in f88615bf33098945e0a42f17733f472083d150b58bdaaa5555a7129d0a51621c
|
||||
F tool/sqlite3_analyzer.c.in 8da2b08f56eeac331a715036cf707cc20f879f231362be0c22efd682e2b89b4f
|
||||
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
|
||||
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
|
||||
F tool/src-verify.c 41c586dee84d0b190ad13e0282ed83d4a65ec9fefde9adf4943efdf6558eea7f
|
||||
@ -2156,8 +2156,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 704943e96f2620b99260667ac9922c2f72bc3e92e2dfe1d9c2a91c7b704564d9
|
||||
R e56f90f682975bdbaf88cd4673a534d1
|
||||
P 4443b7e592da97d1cb1b3b79ed0559452d8057a33aba4d184c2fffbf200e05f5
|
||||
R f76eccd563bb40276e5cf372a3372f6a
|
||||
U drh
|
||||
Z a3427ef23d574bfd370854aa9641acf2
|
||||
Z 389ec51294279a741a10f4bf32e2923d
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
4443b7e592da97d1cb1b3b79ed0559452d8057a33aba4d184c2fffbf200e05f5
|
||||
769de0b98e136e4a0945b80216d0c9583c1ccd9de69cb0494875c2300e172646
|
@ -19,8 +19,55 @@ INCLUDE sqlite3.c
|
||||
#endif
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
#if defined(_WIN32)
|
||||
INCLUDE $ROOT/ext/consio/console_io.h
|
||||
INCLUDE $ROOT/ext/consio/console_io.c
|
||||
|
||||
/* Substitute "puts" command. Only these forms recognized:
|
||||
**
|
||||
** puts STRING
|
||||
** puts stderr STRING
|
||||
** puts -nonewline STRING
|
||||
*/
|
||||
static int subst_puts(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const*objv
|
||||
){
|
||||
FILE *pOut = stdout;
|
||||
const char *zOut;
|
||||
int addNewLine = 1;
|
||||
if( objc==2 ){
|
||||
zOut = Tcl_GetString(objv[1]);
|
||||
}else if( objc!=3 ){
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?stderr|-nonewline? STRING");
|
||||
return TCL_ERROR;
|
||||
}else{
|
||||
const char *zArg = Tcl_GetString(objv[1]);
|
||||
if( zArg==0 ) return TCL_ERROR;
|
||||
zOut = Tcl_GetString(objv[2]);
|
||||
if( strcmp(zArg, "stderr")==0 ){
|
||||
pOut = stderr;
|
||||
}else if( strcmp(zArg, "-nonewline")==0 ){
|
||||
addNewLine = 0;
|
||||
}else{
|
||||
Tcl_AppendResult(interp, "bad argument: ", zArg, 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
fPutsUtf8(zOut, pOut);
|
||||
if( addNewLine ) fPutsUtf8("\n", pOut);
|
||||
return TCL_OK;
|
||||
}
|
||||
#endif /* defined(_WIN32) */
|
||||
|
||||
const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
|
||||
#if defined(_WIN32)
|
||||
Tcl_CreateObjCommand(interp, "puts", subst_puts, 0, 0);
|
||||
#else
|
||||
(void)interp;
|
||||
#endif
|
||||
return
|
||||
BEGIN_STRING
|
||||
INCLUDE $ROOT/tool/spaceanal.tcl
|
||||
|
Loading…
Reference in New Issue
Block a user