Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of MB_LEN_MAX/MB_CUR_MAX #73

Open
th-otto opened this issue Jul 7, 2024 · 0 comments
Open

Definition of MB_LEN_MAX/MB_CUR_MAX #73

th-otto opened this issue Jul 7, 2024 · 0 comments

Comments

@th-otto
Copy link
Contributor

th-otto commented Jul 7, 2024

In mintlib, those 2 macros are defined to 1, however the wctomb() style of functions produce up to 4 bytes. I wonder whether we need to change those definitions?

Also, the functions in the multibyte directory were originally taken from musl. There (as in most implementations) sizeof(wchar_t) is 4. I'm not entirely sure whether that implementation also works for our case where sizeof(wchar_t) == 2. There are at least some dubious tests like

if (!(c&(1U<<31))) {
and
} else if ((unsigned)wc-0x10000 < 0x100000) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant