]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the character width tables for the CLI such that all unicode code-points
authordrh <>
Mon, 30 Sep 2024 18:19:38 +0000 (18:19 +0000)
committerdrh <>
Mon, 30 Sep 2024 18:19:38 +0000 (18:19 +0000)
less than 0x300 have a width of 1.  This is in fact the case for Mac, Ubuntu,
and Windows.

FossilOrigin-Name: f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb

manifest
manifest.uuid
src/shell.c.in

index 77ea93c2618b0f11b35cbf108f68d7df1410d7c5..cd4363196af49d69e3eb0b1d22d5ae69ea26a1c0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sfts5,\savoid\sstarting\sa\snew\smerge\sof\slevel\sL\sif\sthere\sexists\salready\san\songoing\smerge\sof\sa\slevel\sless\sthan\sL.
-D 2024-09-30T17:28:45.511
+C Fix\sthe\scharacter\swidth\stables\sfor\sthe\sCLI\ssuch\sthat\sall\sunicode\scode-points\nless\sthan\s0x300\shave\sa\swidth\sof\s1.\s\sThis\sis\sin\sfact\sthe\scase\sfor\sMac,\sUbuntu,\nand\sWindows.
+D 2024-09-30T18:19:38.492
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -768,7 +768,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c 9750a281f7ba073b4e6da2be1a6c4071f5d841a7746c5fb3f70d6d793b6675ea
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe
-F src/shell.c.in 345173187067363374187176a8bbe779e359849e635d8288202000ee87f4405a
+F src/shell.c.in d71d2463459e6cd9c2f2d702545aed5113ffbcea963c19c1e6d3a6d762ef959c
 F src/sqlite.h.in b20547021d20ba016c2fd0500f14f08a21ff23e64a0ed93e72ca0fecb9e1d0a0
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -2213,8 +2213,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 76b6331e6a705a420a64820a18214f07cf4c1d5151e7158d6fff09964e63f352
-R af602edd5730d15273eb424f12f293da
-U dan
-Z 7c2ca47bd5a0ad794a2bc7691bf0167e
+P 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a
+R 196058ccce20b5d040ef28c3115701ff
+U drh
+Z c9a58ad028df05647dcb5802e9848199
 # Remove this line to create a well-formed Fossil manifest.
index 35fff3b926f94a33349193662e394af745e58cc6..4742ec1d1dca157fc52a29ad384a8c74dd56a5f1 100644 (file)
@@ -1 +1 @@
-350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a
+f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb
index d1fc6aa748b9faf442bd673b838b68ac12bc3555..35b9b089fa6af0f9504259656c19e581a2c812fc 100644 (file)
@@ -631,7 +631,7 @@ static const struct {
   unsigned char w;    /* Width of the character in columns */
   int iFirst;         /* First character in a span having this width */
 } aUWidth[] = {
-   /* {0, 0x00000},  {1, 0x00020},  {0, 0x0007f},  {1, 0x000a0}, */
+   /* {1, 0x00000}, */
   {0, 0x00300},  {1, 0x00370},  {0, 0x00483},  {1, 0x00487},  {0, 0x00488},
   {1, 0x0048a},  {0, 0x00591},  {1, 0x005be},  {0, 0x005bf},  {1, 0x005c0},
   {0, 0x005c1},  {1, 0x005c3},  {0, 0x005c4},  {1, 0x005c6},  {0, 0x005c7},
@@ -709,9 +709,6 @@ int cli_wcwidth(int c){
   int iFirst, iLast;
 
   /* Fast path for common characters */
-  if( c<0x20 ) return 0;
-  if( c<0x7f ) return 1;
-  if( c<0xa0 ) return 0;
   if( c<=0x300 ) return 1;
 
   /* The general case */