From: drh <> Date: Wed, 22 Oct 2025 21:00:52 +0000 (+0000) Subject: Column modes are now working. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e40b5d9867c422f53762ec11137197ccf1963624;p=thirdparty%2Fsqlite.git Column modes are now working. FossilOrigin-Name: ed1c8a62ff6985845a2b664f12752f97404b0449e4290d8604a215406590290c --- diff --git a/ext/qrf/qrf.c b/ext/qrf/qrf.c index 9e7fbf59c9..44d94ed094 100644 --- a/ext/qrf/qrf.c +++ b/ext/qrf/qrf.c @@ -876,7 +876,7 @@ static void qrfColumnar(Qrf *p){ p->actualWidth = sqlite3_malloc64( sizeof(int)*nColumn ); if( p->actualWidth==0 ){ qrfOom(p); goto qrf_column_end; } for(i=0; ispec.nWidth && ispec.aWidth[i]; + int w = ispec.nWidth ? p->spec.aWidth[i] : 0; if( w<0 ) w = -w; p->actualWidth[i] = w; } @@ -951,6 +951,7 @@ static void qrfColumnar(Qrf *p){ if( aiDspyWth[k]>p->actualWidth[i] ){ p->actualWidth[i] = aiDspyWth[k]; } + k++; if( azNextLine[i] ){ bNextLine = 1; abRowDiv[nRow-1] = 0; @@ -969,13 +970,13 @@ static void qrfColumnar(Qrf *p){ if( p->spec.bShowCNames ){ for(i=0; iactualWidth[i]; - if( p->spec.aWidth[i]<0 ) w = -w; + if( ispec.nWidth && p->spec.aWidth[i]<0 ) w = -w; qrfWidthPrint(p, p->pOut, w, azData[i]); - sqlite3_str_append(p->pOut, i==nColumn-1?"\n":" ", 1); + sqlite3_str_appendall(p->pOut, i==nColumn-1?"\n":" "); } for(i=0; ipOut, p->actualWidth[i], '-'); - sqlite3_str_append(p->pOut, i==nColumn-1?"\n":" ", 1); + sqlite3_str_appendall(p->pOut, i==nColumn-1?"\n":" "); } } break; @@ -1039,7 +1040,7 @@ static void qrfColumnar(Qrf *p){ z = azData[i]; if( z==0 ) z = ""; w = p->actualWidth[j]; - if( p->spec.aWidth[j]<0 ) w = -w; + if( jspec.nWidth && p->spec.aWidth[j]<0 ) w = -w; qrfWidthPrint(p, p->pOut, w, z); if( j==nColumn-1 ){ sqlite3_str_appendall(p->pOut, rowSep); @@ -1068,6 +1069,7 @@ static void qrfColumnar(Qrf *p){ }else if( p->spec.eFormat==QRF_MODE_Box ){ qrfBoxSeparator(p, BOX_12, BOX_124, BOX_14); } + qrfWrite(p); qrf_column_end: /* Free allocated memory */ diff --git a/manifest b/manifest index 1a581d66c7..8060808449 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Code\sin\splace\sto\sdo\scolumn\sformats.\s\sCompiles,\sbut\sdoes\snot\swork.\nThis\sis\san\sincremental\scheck-in. -D 2025-10-22T18:09:54.467 +C Column\smodes\sare\snow\sworking. +D 2025-10-22T21:00:52.621 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -417,7 +417,7 @@ F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6 F ext/misc/zipfile.c 09e6e3a3ff40a99677de3c0bc6569bd5f4709b1844ac3d1c1452a456c5a62f1c F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee F ext/qrf/qrf-tester.c 59cb5b1ed889ba57836d0fbb07b583fdfdfe409b1344f4f119fc13dff3a7356a -F ext/qrf/qrf.c 8bd0adcf1eea3eb10d57efbbbc4dd25fc3783cd857db9543648177d0920db6aa +F ext/qrf/qrf.c 8f39553c203d704d271b37d2d3cd8c01bafef9ef0154af8ef20a4bb2335ab4fe F ext/qrf/qrf.h e9585fbadc45e8182faf208a0f86984d5130d89742364424fd1c39f12457f013 F ext/qrf/qrf.md 4eea619191dab7bbf483eff3fe3b074a07d7c8c50bc86070a4485797d386d1ff F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8 @@ -2175,8 +2175,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P e33ca68fee5bb6c5195f5a8fef231dcf08433806f5f44b855c2c670d37df6ac7 -R 4d8b08236a565a7b1259c528870b0576 +P a05e021354ff5868f75ac01d384c3aaaedb7c483dd8f9533f6ab9fbb66b5f077 +R 024ce8fdd2ea788432f0d90e246824c6 U drh -Z c5eef447fa054545ce6feb7b549f988b +Z bc27d118506f791034d30a910452eace # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 70d8b6fd41..2a2cfcb7a1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a05e021354ff5868f75ac01d384c3aaaedb7c483dd8f9533f6ab9fbb66b5f077 +ed1c8a62ff6985845a2b664f12752f97404b0449e4290d8604a215406590290c