From: drh <> Date: Thu, 9 Oct 2025 14:14:14 +0000 (+0000) Subject: Update the result formatter spec such that column width are stored X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=377c4a8bfeb1e0e9a6815c50b7b3cfc0975dd3c2;p=thirdparty%2Fsqlite.git Update the result formatter spec such that column width are stored in 16-bit signed integers. FossilOrigin-Name: d5dfbcf077db340690c482c8ebcc4def85fc9127fa6fcde2f71acfd928feaeff --- diff --git a/ext/misc/resfmt.md b/ext/misc/resfmt.md index 4e5bbeacaa..5c5af5a50b 100644 --- a/ext/misc/resfmt.md +++ b/ext/misc/resfmt.md @@ -58,7 +58,7 @@ struct ResfmtSpec { const char *zRowSep; /* Alternative row separator */ const char *zTableName; /* Output table name */ int nWidth; /* Number of column width parameters */ - int *aWidth; /* Column widths */ + short int *aWidth; /* Column widths */ char *(*pRender)(void*,sqlite3_value*); /* Render a value */ ssize_t (*pWrite)(void*,const unsigned char*,ssize_t); /* Write callback */ void *pWriteArg; /* First argument to write callback */ @@ -148,10 +148,13 @@ when the MODE_Insert output mode is used. ### 2.9 Column Widths And Alignments -The ResfmtSpec.aWidth[] array, if specified, is an array of integers -that specify the minimum column width and the alignment for all columns -in columnar output modes. Negative values mean right-justify. The +The ResfmtSpec.aWidth[] array, if specified, is an array of +16-bit signed integers that specify the minimum column width and +the alignment for all columns in columnar output modes. Negative +values mean right-justify. The absolute value is the minimum of the corresponding column. +These widths are deliberately stored in a 16-bit signed integer +as no good can come from having column widths greater than 32767. The ResfmtSpec.nWidth field is the number of values in the aWidth[] array. Any column beyond the nWidth-th column are assumed to have diff --git a/manifest b/manifest index fa59fdbb9f..7061d69ca8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\spRender\scallback\sto\sthe\squery\sresult\sformatter\sspec. -D 2025-10-08T20:10:01.576 +C Update\sthe\sresult\sformatter\sspec\ssuch\sthat\scolumn\swidth\sare\sstored\nin\s16-bit\ssigned\sintegers. +D 2025-10-09T14:14:14.849 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -388,7 +388,7 @@ F ext/misc/qpvtab.c fc189e127f68f791af90a487f4460ec91539a716daf45a0c357e963fd47c F ext/misc/randomjson.c ef835fc64289e76ac4873b85fe12f9463a036168d7683cf2b773e36e6262c4ed F ext/misc/regexp.c 548151f3e57506fda678e6a65e85a763f4eece653287e1ad44e167f9485e0c6b F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c -F ext/misc/resfmt.md 9c9429289d45c3f346138ef62ad8bf1793b0248af049f42cb92ff4e0af0d20b1 +F ext/misc/resfmt.md 676af474a6598dceb2e786f407917fd08f88891525929569c365c9b9dcb718e7 F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c F ext/misc/scrub.c 2a44b0d44c69584c0580ad2553f6290a307a49df4668941d2812135bfb96a946 F ext/misc/series.c cbbec483aa0246661e7656971ce4de8e62ecc3151be94218306206fe4f5b7a9e @@ -2170,8 +2170,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 550c48f7c3da30743b994c044ecacc20c434c5251dac8959a96550397056d0a2 -R 4aa122dcf8ac1a894030d96f8bb71b36 +P 642cf4568abaf91e2a6177b874c869661907a2c594ed90c3175847926a82a365 +R faa0975cfafd6afab1699e38623664fe U drh -Z cc6ee2d4c29330b60f383a60141d1825 +Z b90543e84b837f9b9d4e7e60a11ace7a # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7080e582bd..3a536e7ad8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -642cf4568abaf91e2a6177b874c869661907a2c594ed90c3175847926a82a365 +d5dfbcf077db340690c482c8ebcc4def85fc9127fa6fcde2f71acfd928feaeff