summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 11:11:41 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 11:11:41 +0000
commitd81cc794871df295e148631e4ffbc033bbd1a695 (patch)
tree352dad501c62318eac67a088cc262f7c044a54ac /app
parentfe456aa3d2f2bfa26951922d04a45014ed4aecc4 (diff)
Importing xterm 216
Diffstat (limited to 'app')
-rw-r--r--app/xterm/precompose.c48
1 files changed, 17 insertions, 31 deletions
diff --git a/app/xterm/precompose.c b/app/xterm/precompose.c
index da0d346d2..afe4c3f3f 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.8 2007/02/05 01:06:36 Thomas.Wolff Exp $ */
-/* $XFree86$ */
+/* $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 $ */
#include <precompose.h>
@@ -754,17 +754,19 @@ static struct {
{ 0x0F76, 0x0FB2, 0x0F80},
{ 0x0F78, 0x0FB3, 0x0F80},
{ 0x1026, 0x1025, 0x102E},
-{ 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},
+{ 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},
{ 0x1E38, 0x1E36, 0x0304},
{ 0x1E39, 0x1E37, 0x0304},
{ 0x1E5C, 0x1E5A, 0x0304},
@@ -1014,34 +1016,18 @@ static struct {
{ 0x30FE, 0x30FD, 0x3099},
{ 0xFB2C, 0xFB49, 0x05C1},
{ 0xFB2D, 0xFB49, 0x05C2},
-{ 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 long sought = ((unsigned) base << UNICODE_SHIFT) | (unsigned) comb;
- unsigned long that;
+ unsigned int sought = ((unsigned)base << 16) | (unsigned)comb, that;
/* binary search */
while (max >= min) {
mid = (min + max) / 2;
- that = ((unsigned) precompositions[mid].base << UNICODE_SHIFT) | ((unsigned) precompositions[mid].comb);
+ that = ((unsigned)precompositions[mid].base << 16) | ((unsigned)precompositions[mid].comb);
if (that < sought) {
min = mid + 1;
} else if (that > sought) {