wchar_t -> uint32_t

This commit is contained in:
mintsuki 2023-01-29 00:36:41 +01:00
parent 4f44263ca3
commit 80858a52a5
1 changed files with 4 additions and 4 deletions

8
term.c
View File

@ -900,12 +900,12 @@ static uint8_t dec_special_to_cp437(uint8_t 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;
@ -924,7 +924,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max) {
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[] = {