Files
makronix/xsrc/external/mit/xterm/dist/unicode/precompose.c.tail
T
lotherkandClaude Opus 5.5 c1c0713359 xsrc: import NetBSD xsrc 99aacae30 raw (no .git), its commit in xsrc/BASE
X is the base's again (Konrad, 2026-11-13): the X from pkgsrc in the
makronix set did not start anywhere (no input driver, no keymap, no
"fixed" font; dtlogin "The X-server can not be started on display :0").
Same commit as before the removal in e7bd6d940 (PINS then).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:13:37 +00:00

25 lines
644 B
Plaintext

};
#define UNICODE_SHIFT 21
int do_precomposition(int base, int comb) {
int min = 0;
int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1;
unsigned long sought = ((unsigned) base << UNICODE_SHIFT) | (unsigned) comb;
/* binary search */
while (max >= min) {
int mid = (min + max) / 2;
unsigned long that = ((unsigned long) precompositions[mid].base << UNICODE_SHIFT) | ((unsigned) precompositions[mid].comb);
if (that < sought) {
min = mid + 1;
} else if (that > sought) {
max = mid - 1;
} else {
return precompositions[mid].replacement;
}
}
/* no match */
return -1;
}