diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-03-09 14:45:40 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-03-09 14:45:40 +0000 |
commit | 5b3e1cd121a50c5c3b76c34d6c0e0c6430cefe93 (patch) | |
tree | bdbf56fc5e747e21dad1aabcf4c3275e8f62ce61 /app/xterm/precompose.c | |
parent | e18c4ea24ad92ea4dd3afea7e9a3a583f143cacd (diff) |
Update to xterm 291. Tested by many.
Diffstat (limited to 'app/xterm/precompose.c')
-rw-r--r-- | app/xterm/precompose.c | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/app/xterm/precompose.c b/app/xterm/precompose.c index afe4c3f3f..f420e5440 100644 --- a/app/xterm/precompose.c +++ b/app/xterm/precompose.c @@ -4,8 +4,8 @@ * DO NOT EDIT BY HAND! This is generated by the script * unicode/make-precompose.sh */ -/* $XTermId: precompose.c,v 1.7 2004/12/01 01:27:47 tom Exp $ */ -/* $XFree86: xc/programs/xterm/precompose.c,v 1.3 2004/12/01 01:27:47 dickey Exp $ */ +/* $XTermId: precompose.c,v 1.9 2013/02/03 17:06:01 tom Exp $ */ +/* $XFree86$ */ #include <precompose.h> @@ -754,19 +754,17 @@ static struct { { 0x0F76, 0x0FB2, 0x0F80}, { 0x0F78, 0x0FB3, 0x0F80}, { 0x1026, 0x1025, 0x102E}, -{ 0x1D15E, 0x1D157, 0x1D165}, -{ 0x1D15F, 0x1D158, 0x1D165}, -{ 0x1D160, 0x1D15F, 0x1D16E}, -{ 0x1D161, 0x1D15F, 0x1D16F}, -{ 0x1D162, 0x1D15F, 0x1D170}, -{ 0x1D163, 0x1D15F, 0x1D171}, -{ 0x1D164, 0x1D15F, 0x1D172}, -{ 0x1D1BB, 0x1D1B9, 0x1D165}, -{ 0x1D1BC, 0x1D1BA, 0x1D165}, -{ 0x1D1BD, 0x1D1BB, 0x1D16E}, -{ 0x1D1BF, 0x1D1BB, 0x1D16F}, -{ 0x1D1BE, 0x1D1BC, 0x1D16E}, -{ 0x1D1C0, 0x1D1BC, 0x1D16F}, +{ 0x1B06, 0x1B05, 0x1B35}, +{ 0x1B08, 0x1B07, 0x1B35}, +{ 0x1B0A, 0x1B09, 0x1B35}, +{ 0x1B0C, 0x1B0B, 0x1B35}, +{ 0x1B0E, 0x1B0D, 0x1B35}, +{ 0x1B12, 0x1B11, 0x1B35}, +{ 0x1B3B, 0x1B3A, 0x1B35}, +{ 0x1B3D, 0x1B3C, 0x1B35}, +{ 0x1B40, 0x1B3E, 0x1B35}, +{ 0x1B41, 0x1B3F, 0x1B35}, +{ 0x1B43, 0x1B42, 0x1B35}, { 0x1E38, 0x1E36, 0x0304}, { 0x1E39, 0x1E37, 0x0304}, { 0x1E5C, 0x1E5A, 0x0304}, @@ -1016,18 +1014,39 @@ static struct { { 0x30FE, 0x30FD, 0x3099}, { 0xFB2C, 0xFB49, 0x05C1}, { 0xFB2D, 0xFB49, 0x05C2}, +{ 0x1109A, 0x11099, 0x110BA}, +{ 0x1109C, 0x1109B, 0x110BA}, +{ 0x110AB, 0x110A5, 0x110BA}, +{ 0x1112E, 0x11131, 0x11127}, +{ 0x1112F, 0x11132, 0x11127}, +{ 0x1D15E, 0x1D157, 0x1D165}, +{ 0x1D15F, 0x1D158, 0x1D165}, +{ 0x1D160, 0x1D15F, 0x1D16E}, +{ 0x1D161, 0x1D15F, 0x1D16F}, +{ 0x1D162, 0x1D15F, 0x1D170}, +{ 0x1D163, 0x1D15F, 0x1D171}, +{ 0x1D164, 0x1D15F, 0x1D172}, +{ 0x1D1BB, 0x1D1B9, 0x1D165}, +{ 0x1D1BC, 0x1D1BA, 0x1D165}, +{ 0x1D1BD, 0x1D1BB, 0x1D16E}, +{ 0x1D1BF, 0x1D1BB, 0x1D16F}, +{ 0x1D1BE, 0x1D1BC, 0x1D16E}, +{ 0x1D1C0, 0x1D1BC, 0x1D16F}, }; +#define UNICODE_SHIFT 21 + int do_precomposition(int base, int comb) { int min = 0; int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1; int mid; - unsigned int sought = ((unsigned)base << 16) | (unsigned)comb, that; + unsigned long sought = ((unsigned) base << UNICODE_SHIFT) | (unsigned) comb; + unsigned long that; /* binary search */ while (max >= min) { mid = (min + max) / 2; - that = ((unsigned)precompositions[mid].base << 16) | ((unsigned)precompositions[mid].comb); + that = ((unsigned) precompositions[mid].base << UNICODE_SHIFT) | ((unsigned) precompositions[mid].comb); if (that < sought) { min = mid + 1; } else if (that > sought) { |