Fossil SCM

Import the recent changes to the sqlite3_qrf_wcwidth() function from SQLite check-in [https://sqlite.org/src/info/35f39f7cb1|35f39f7cb1] to cli_wcwidth() for feature parity.

florian 2025-12-05 15:35 trunk
Commit 98287b7b05d1b5ff452466487f2f927c6afb74d3b9e4c7e9494416bcd8de432c
1 file changed +2 -2
+2 -2
--- src/comformat.c
+++ src/comformat.c
@@ -78,11 +78,11 @@
7878
{1, 0x00ece}, {0, 0x00f18}, {1, 0x00f1a}, {0, 0x00f35}, {1, 0x00f36},
7979
{0, 0x00f37}, {1, 0x00f38}, {0, 0x00f39}, {1, 0x00f3a}, {0, 0x00f71},
8080
{1, 0x00f7f}, {0, 0x00f80}, {1, 0x00f85}, {0, 0x00f86}, {1, 0x00f88},
8181
{0, 0x00f90}, {1, 0x00f98}, {0, 0x00f99}, {1, 0x00fbd}, {0, 0x00fc6},
8282
{1, 0x00fc7}, {0, 0x0102d}, {1, 0x01031}, {0, 0x01032}, {1, 0x01033},
83
- {0, 0x01036}, {1, 0x01038}, {0, 0x01039}, {1, 0x0103a}, {0, 0x01058},
83
+ {0, 0x01036}, {1, 0x0103b}, {0, 0x01058},
8484
{1, 0x0105a}, {2, 0x01100}, {0, 0x01160}, {1, 0x01200}, {0, 0x0135f},
8585
{1, 0x01360}, {0, 0x01712}, {1, 0x01715}, {0, 0x01732}, {1, 0x01735},
8686
{0, 0x01752}, {1, 0x01754}, {0, 0x01772}, {1, 0x01774}, {0, 0x017b4},
8787
{1, 0x017b6}, {0, 0x017b7}, {1, 0x017be}, {0, 0x017c6}, {1, 0x017c7},
8888
{0, 0x017c9}, {1, 0x017d4}, {0, 0x017dd}, {1, 0x017de}, {0, 0x0180b},
@@ -121,11 +121,11 @@
121121
*/
122122
static int cli_wcwidth(int c){
123123
int iFirst, iLast;
124124
125125
/* Fast path for common characters */
126
- if( c<=0x300 ) return 1;
126
+ if( c<0x300 ) return 1;
127127
128128
/* The general case */
129129
iFirst = 0;
130130
iLast = sizeof(aUWidth)/sizeof(aUWidth[0]) - 1;
131131
while( iFirst<iLast-1 ){
132132
--- src/comformat.c
+++ src/comformat.c
@@ -78,11 +78,11 @@
78 {1, 0x00ece}, {0, 0x00f18}, {1, 0x00f1a}, {0, 0x00f35}, {1, 0x00f36},
79 {0, 0x00f37}, {1, 0x00f38}, {0, 0x00f39}, {1, 0x00f3a}, {0, 0x00f71},
80 {1, 0x00f7f}, {0, 0x00f80}, {1, 0x00f85}, {0, 0x00f86}, {1, 0x00f88},
81 {0, 0x00f90}, {1, 0x00f98}, {0, 0x00f99}, {1, 0x00fbd}, {0, 0x00fc6},
82 {1, 0x00fc7}, {0, 0x0102d}, {1, 0x01031}, {0, 0x01032}, {1, 0x01033},
83 {0, 0x01036}, {1, 0x01038}, {0, 0x01039}, {1, 0x0103a}, {0, 0x01058},
84 {1, 0x0105a}, {2, 0x01100}, {0, 0x01160}, {1, 0x01200}, {0, 0x0135f},
85 {1, 0x01360}, {0, 0x01712}, {1, 0x01715}, {0, 0x01732}, {1, 0x01735},
86 {0, 0x01752}, {1, 0x01754}, {0, 0x01772}, {1, 0x01774}, {0, 0x017b4},
87 {1, 0x017b6}, {0, 0x017b7}, {1, 0x017be}, {0, 0x017c6}, {1, 0x017c7},
88 {0, 0x017c9}, {1, 0x017d4}, {0, 0x017dd}, {1, 0x017de}, {0, 0x0180b},
@@ -121,11 +121,11 @@
121 */
122 static int cli_wcwidth(int c){
123 int iFirst, iLast;
124
125 /* Fast path for common characters */
126 if( c<=0x300 ) return 1;
127
128 /* The general case */
129 iFirst = 0;
130 iLast = sizeof(aUWidth)/sizeof(aUWidth[0]) - 1;
131 while( iFirst<iLast-1 ){
132
--- src/comformat.c
+++ src/comformat.c
@@ -78,11 +78,11 @@
78 {1, 0x00ece}, {0, 0x00f18}, {1, 0x00f1a}, {0, 0x00f35}, {1, 0x00f36},
79 {0, 0x00f37}, {1, 0x00f38}, {0, 0x00f39}, {1, 0x00f3a}, {0, 0x00f71},
80 {1, 0x00f7f}, {0, 0x00f80}, {1, 0x00f85}, {0, 0x00f86}, {1, 0x00f88},
81 {0, 0x00f90}, {1, 0x00f98}, {0, 0x00f99}, {1, 0x00fbd}, {0, 0x00fc6},
82 {1, 0x00fc7}, {0, 0x0102d}, {1, 0x01031}, {0, 0x01032}, {1, 0x01033},
83 {0, 0x01036}, {1, 0x0103b}, {0, 0x01058},
84 {1, 0x0105a}, {2, 0x01100}, {0, 0x01160}, {1, 0x01200}, {0, 0x0135f},
85 {1, 0x01360}, {0, 0x01712}, {1, 0x01715}, {0, 0x01732}, {1, 0x01735},
86 {0, 0x01752}, {1, 0x01754}, {0, 0x01772}, {1, 0x01774}, {0, 0x017b4},
87 {1, 0x017b6}, {0, 0x017b7}, {1, 0x017be}, {0, 0x017c6}, {1, 0x017c7},
88 {0, 0x017c9}, {1, 0x017d4}, {0, 0x017dd}, {1, 0x017de}, {0, 0x0180b},
@@ -121,11 +121,11 @@
121 */
122 static int cli_wcwidth(int c){
123 int iFirst, iLast;
124
125 /* Fast path for common characters */
126 if( c<0x300 ) return 1;
127
128 /* The general case */
129 iFirst = 0;
130 iLast = sizeof(aUWidth)/sizeof(aUWidth[0]) - 1;
131 while( iFirst<iLast-1 ){
132

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button