]> Savannah Git Hosting - gnulib.git/commit
dfa: Overcome wchar_t limitations.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Jul 2023 22:52:23 +0000 (00:52 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 10 Jul 2023 22:55:55 +0000 (00:55 +0200)
commitd2777e80ff023a7709598858cda3aa7f539003eb
treed6352722f11bd81b99e5bf337879969303e73d6e
parent2d46fcdd3fa38139f3c3b6cbc3439363553ee0e7
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-regular, 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.
ChangeLog
NEWS
lib/dfa.c
lib/localeinfo.c
lib/localeinfo.h
modules/dfa
modules/dfa-tests