Make MSVC accept it, too. (Cannot use static const int as part of a constant expression?)
FossilOrigin-Name: bb278d2496b27d2e2ee3cedd6fc54394e71ab2ba5d3d51593f97e897b8b306a4
This commit is contained in:
parent
8dd4697e48
commit
a0cd392979
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Make\sit\sbuildable.\sPull\stest\sprogram\sfrom\stestee.\sZap\sstray\sfprintf().
|
||||
D 2023-11-05T23:55:41.214
|
||||
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
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -669,7 +669,7 @@ 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 5ff9be9911d73bdf89d33b57db282e1777d2fc906c3e1c573d2e90adfb85393b x
|
||||
F src/console_io.c f1d63f8fd12236fb2e7d57dee3fd4f068c881649b267e716804da84ae1672b31 x
|
||||
F src/console_io.h 88b5376f02550b03a0d0f44e71fe6b8dccc025b33f7822780fed9cfe58961fe3
|
||||
F src/ctime.c 23331529e654be40ca97d171cbbffe9b3d4c71cc53b78fe5501230675952da8b
|
||||
F src/date.c eebc54a00e888d3c56147779e9f361b77d62fd69ff2008c5373946aa1ba1d574
|
||||
@ -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 e8568b1d925c2118eb08394dd8aa50cfb521240f87668f535ec4a03e67dc9a09
|
||||
R 35673b0955f1c798661d8793bf63d1c3
|
||||
P 2b850aca1e76805a0358064318a765fa66ce394d015936fd47683d74ca4c187e
|
||||
R 93fbedf6374d1b71d34353b4143eaca1
|
||||
U larrybr
|
||||
Z beec5bac02182bb7b20a99bcb3d7ba4e
|
||||
Z f691c4a528e1fad9be92f83414b324ea
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
2b850aca1e76805a0358064318a765fa66ce394d015936fd47683d74ca4c187e
|
||||
bb278d2496b27d2e2ee3cedd6fc54394e71ab2ba5d3d51593f97e897b8b306a4
|
@ -249,18 +249,20 @@ INT_LINKAGE int fprintfUtf8(FILE *pfO, const char *zFormat, ...){
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
INT_LINKAGE char* fgetsUtf8(char *cBuf, int ncMax, FILE *pfIn){
|
||||
if( pfIn==0 ) pfIn = stdin;
|
||||
#if SHELL_CON_TRANSLATE
|
||||
if( pfIn == consoleInfo.pst[0].pf ){
|
||||
static const int nwcLen = 150;
|
||||
WCHAR wcBuf[nwcLen+1];
|
||||
#define SHELL_GULP 150 /* Count of WCHARS to be gulped at a time */
|
||||
WCHAR wcBuf[SHELL_GULP+1];
|
||||
int lend = 0, noc = 0;
|
||||
if( consoleInfo.stdinEof ) return 0;
|
||||
if( ncMax > 0 ) cBuf[0] = 0;
|
||||
while( noc < ncMax-8-1 && !lend ){
|
||||
/* There is room for at least 2 more characters and a 0-terminator. */
|
||||
int na = (ncMax > nwcLen*4+1 + noc)? nwcLen : (ncMax-1 - noc)/4;
|
||||
int na = (ncMax > SHELL_GULP*4+1 + noc)? SHELL_GULP : (ncMax-1 - noc)/4;
|
||||
#undef SHELL_GULP
|
||||
DWORD nbr = 0;
|
||||
BOOL bRC = ReadConsoleW(consoleInfo.pst[0].hx, wcBuf, na, &nbr, 0);
|
||||
if( bRC && nbr>0 && (wcBuf[nbr-1]&0xF800)==0xD800 ){
|
||||
|
Loading…
x
Reference in New Issue
Block a user