Fast and reasonably complete (framebuffer) terminal emulator (Zig fork)

wchar_t -> uint32_t

mintsuki 80858a52 4f44263c

Changed files
+4 -4
+4 -4
term.c
···
// https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
struct interval {
-
wchar_t first;
-
wchar_t last;
+
uint32_t first;
+
uint32_t last;
};
/* auxiliary function for binary search in interval table */
-
static int bisearch(wchar_t ucs, const struct interval *table, int max) {
+
static int bisearch(uint32_t ucs, const struct interval *table, int max) {
int min = 0;
int mid;
···
return 0;
}
-
int mk_wcwidth(wchar_t ucs) {
+
int mk_wcwidth(uint32_t ucs) {
/* sorted list of non-overlapping intervals of non-spacing characters */
/* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
static const struct interval combining[] = {