Commit 77c1c85cc118adf34eff83682d3ad9aff9c0ed53

Bruno Haible 2023-07-07T12:04:14

dfa: Overcome wchar_t limitations. * lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK. (case_folded_counterparts): Change array element type to char32_t. * lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK. (is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc. (lonesome_lower): Change element type to 'unsigned short'. (case_folded_counterparts): Change array element type to char32_t. Use c32toupper instead of towupper. Use c32tolower instead of towlower. * lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK. (struct mb_char_classes): Change element type of 'chars' to char32_t. (mbs_to_wchar): Use mbrtoc32 instead of mbrtowc. (setbit_wc): Change type of first argument to char32_t. Use c32tob instead of wctob. (parse_bracket_exp): Update. (lex): Use c32isprint instead of iswprint. Use c32isspace instead of iswspace. Use c32rtomb instead of a %lc directive. (addtok_wc): Use c32rtomb instead of wcrtomb. (atom): Update. * modules/dfa (Depends-on): Remove wctype-h. Add uchar, mbrtoc32, c32rtomb, c32tob, c32tolower, c32toupper, c32isprint, c32isspace. (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with $(LIBUNISTRING) $(LIBC32CONV). * NEWS: Mention the change.