Skip to content

Definition of MB_LEN_MAX/MB_CUR_MAX #73

@th-otto

Description

@th-otto

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) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions