representing charsets

Andy Koppe
Fri Apr 2 21:00:00 GMT 2010

Corinna Vinschen:
>> Unfortunately I can't see where to store the enums for the locale
>> category codesets, since __part_load_locale in newlib and the new
>> rebase_locale_buf in assume that the various lc_*_T
>> structs consist entirely of pointers.
> And that should stay that way.  This is consistent with the way the
> data is loaded from files.  There doesn't speak anything against
> storing a pointer to the enum in the structure, though.

So that enum would need to be placed in the the various _local_bufs
then, which means it would need to appear in binary form in the locale
file format on non-Cygwin systems. Can we do that?

Also, I belatedly realised why the charsets might be represented as
strings in the first place: because charset definitions could be read
from disk rather than being hardcoded as they are in newlib. Should I
still pursue the enum idea or go back to your idea of passing a
pointer to the relevant charmap table (if any) around?

Thanks for the patch.


More information about the Cygwin-developers mailing list