diff --git a/ext/consio/console_io.c b/ext/consio/console_io.c index 6b837cbafc..75324a34fd 100755 --- a/ext/consio/console_io.c +++ b/ext/consio/console_io.c @@ -655,6 +655,10 @@ cfWrite(const void *buf, size_t osz, size_t ocnt, FILE *pf){ return rv; } +/* An fgets() equivalent, using Win32 file API for actual input. +** Input ends when given buffer is filled or a newline is read. +** If the FILE object is in text mode, swallows 0x0D. (ASCII CR) +*/ SQLITE_INTERNAL_LINKAGE char * cfGets(char *cBuf, int n, FILE *pf){ int nci = 0; @@ -665,7 +669,10 @@ cfGets(char *cBuf, int n, FILE *pf){ while( nci < n-1 ){ DWORD nr; if( !ReadFile(fai.fh, cBuf+nci, 1, &nr, 0) || nr==0 ) break; - if( nr>0 && (!eatCR || cBuf[nci]!='\r') ) nci += nr; + if( nr>0 && (!eatCR || cBuf[nci]!='\r') ){ + nci += nr; + if( cBuf[nci-nr]=='\n' ) break; + } } if( nci < n ) cBuf[nci] = 0; return (nci>0)? cBuf : 0; diff --git a/manifest b/manifest index 404dfb05fd..6f14866d00 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\stestrunner.tcl,\scompile\sthe\sWindows\sDefault\sconfiguration\susing\nSQLITE_ENABLE_STMT_SCANSTATUS. -D 2024-09-03T14:00:36.487 +C Fix\sext/consio\sso\sthat\sit\sworks\scorrectly\swith\sSQLITE_USE_ONLY_WIN32. +D 2024-09-03T14:15:57.425 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -53,7 +53,7 @@ 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 6e02dea912a49f55785b0027fe77960aafee6c236307c23f82ec86a69f1a2001 x +F ext/consio/console_io.c d2b74afae8d301de2e8447b1045fcd33eb59df13bf581d906d99c74fe5d2b13f x F ext/consio/console_io.h b5ebe34aa15b357621ebbea3d3f2e2b24750d4280b5802516409e23947fd9ee5 F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3 F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4 @@ -2212,8 +2212,9 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P c5557f281c6294b6db6682349d245feac7c6ce7f4f61356f486afdf186c566c4 -R af529c0653dd6eafafdc4a7dab6ec4ca +P 49e8b1635f29d9fd0dc2ef6e312fd4129f2283f68e9423d95ff9b55077688ad7 2d783524d1671d988ebb1b21c83de99c9f335963b6c20cf4df612f58c13da913 +R 1f005fca5fe5df8e4ebc8001e171645f +T +closed 2d783524d1671d988ebb1b21c83de99c9f335963b6c20cf4df612f58c13da913 U drh -Z 9034919d1245ea10e06eda748f2be5e1 +Z 207a73144d24fc75006dde9e7a085311 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 32840dde2a..f51ba4769e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -49e8b1635f29d9fd0dc2ef6e312fd4129f2283f68e9423d95ff9b55077688ad7 +efc6f3d7e92a25f440fb8d392daf325af5ca7dca104a5bb4bd59f7df93af53b0