From: drh <> Date: Wed, 22 Oct 2025 21:24:17 +0000 (+0000) Subject: Assigned widths and alignments on columns. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a678784c4c1da1ae230a8a030f136ce51134811f;p=thirdparty%2Fsqlite.git Assigned widths and alignments on columns. FossilOrigin-Name: f6359f2fa776ef04449660a3452fdf7ee943523bf3290f3c0e15693962bca1db --- diff --git a/ext/qrf/qrf-tester.c b/ext/qrf/qrf-tester.c index b17bc0df1e..6d194be8af 100644 --- a/ext/qrf/qrf-tester.c +++ b/ext/qrf/qrf-tester.c @@ -90,6 +90,7 @@ int main(int argc, char **argv){ int rc; int lineNum = 0; int bUseWriter = 1; + short int aWidth[100]; sqlite3_qrf_spec spec; char zLine[1000]; @@ -303,6 +304,29 @@ int main(int argc, char **argv){ if( strncmp(zLine, "--zRowSep=", 10)==0 ){ spec.zRowSep = tempStrdup(&zLine[10]); }else + if( strncmp(zLine, "--mxWidth=", 10)==0 ){ + spec.mxWidth = (short int)atoi(&zLine[10]); + }else + if( strncmp(zLine, "--aWidth=", 9)==0 ){ + const char *zArg = &zLine[9]; + int n = 0; + while( isspace(zArg[0]) ) zArg++; + while( zArg[0]!=0 && nQRF_MX_WIDTH ){ + w = QRF_MX_WIDTH; + }else if( wactualWidth==0 ){ qrfOom(p); goto qrf_column_end; } for(i=0; ispec.nWidth && ispec.nWidth ? p->spec.aWidth[i] : 0; - if( w<0 ) w = -w; + if( w<0 ){ + if( w==QRF_MINUS_ZERO ){ w = 0; } + else{ w = -w; } + } p->actualWidth[i] = w; } while( ispec.nWidth ? p->spec.aWidth[i] : 0; - if( wx==0 ){ + if( wx==0 || wx==QRF_MINUS_ZERO ){ wx = p->spec.mxWidth; } if( wx<0 ) wx = -wx; diff --git a/ext/qrf/qrf.h b/ext/qrf/qrf.h index 18b7b9ceba..abe3b37506 100644 --- a/ext/qrf/qrf.h +++ b/ext/qrf/qrf.h @@ -43,6 +43,13 @@ struct sqlite3_qrf_spec { /* Additional fields may be added in the future */ }; +/* +** Range of values for sqlite3_qrf_spec.aWidth[] entries: +*/ +#define QRF_MX_WIDTH (10000) +#define QRF_MN_WIDTH (-10000) +#define QRF_MINUS_ZERO (-32768) /* Special value meaning -0 */ + /* ** Interfaces */ diff --git a/manifest b/manifest index 8060808449..32589a8d6b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Column\smodes\sare\snow\sworking. -D 2025-10-22T21:00:52.621 +C Assigned\swidths\sand\salignments\son\scolumns. +D 2025-10-22T21:24:17.507 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -416,9 +416,9 @@ F ext/misc/wholenumber.c 0fa0c082676b7868bf2fa918e911133f2b349bcdceabd1198bba5f6 F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6292e60c F ext/misc/zipfile.c 09e6e3a3ff40a99677de3c0bc6569bd5f4709b1844ac3d1c1452a456c5a62f1c F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee -F ext/qrf/qrf-tester.c 59cb5b1ed889ba57836d0fbb07b583fdfdfe409b1344f4f119fc13dff3a7356a -F ext/qrf/qrf.c 8f39553c203d704d271b37d2d3cd8c01bafef9ef0154af8ef20a4bb2335ab4fe -F ext/qrf/qrf.h e9585fbadc45e8182faf208a0f86984d5130d89742364424fd1c39f12457f013 +F ext/qrf/qrf-tester.c 4212d01e1408591c6e6b081d119e125c97efea5a2f97f4ff05c28b8a5e1272bc +F ext/qrf/qrf.c 7a7ffe0839f36618dd16139c9452b609732a374fa56010cf6f69850b60255ca1 +F ext/qrf/qrf.h 8ad45ac2a8661010c936778bb017cb691fddf2fe27546feb28ca67a0f88967e3 F ext/qrf/qrf.md 4eea619191dab7bbf483eff3fe3b074a07d7c8c50bc86070a4485797d386d1ff F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8 F ext/rbu/rbu1.test 25870dd7db7eb5597e2b4d6e29e7a7e095abf332660f67d89959552ce8f8f255 @@ -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 a05e021354ff5868f75ac01d384c3aaaedb7c483dd8f9533f6ab9fbb66b5f077 -R 024ce8fdd2ea788432f0d90e246824c6 +P ed1c8a62ff6985845a2b664f12752f97404b0449e4290d8604a215406590290c +R 225cfbc7236ef4dc95d19fc105dec938 U drh -Z bc27d118506f791034d30a910452eace +Z bcc06565d01477b5bd4c299226559b64 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 2a2cfcb7a1..3e7797477b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ed1c8a62ff6985845a2b664f12752f97404b0449e4290d8604a215406590290c +f6359f2fa776ef04449660a3452fdf7ee943523bf3290f3c0e15693962bca1db