[M3devel] cm3 does not support Scan.LongInt
estellnb at elstel.org
Mon Dec 16 17:42:41 CET 2013
Am 16.12.13 16:00, schrieb Tony Hosking:
> Jumping in late to this whole conversation (please forgive any
> I hesitate to define ANY M3 builtin type in terms of C/C++ standards.
> Regarding WIDECHAR, realize that its definition, like CHAR, should be
> in terms of an enumeration containing some (minimal) number of elements.
> The standard says that CHAR contains at least 256 elements.
> In M3 enumerations all have a direct mapping to INTEGER.
> So, I assume that WIDECHAR would be UTF-32, and TEXT could be encoded
> as UTF-8.
> More radically, what current code will break if CHAR is expanded to
> The language definition would allow that (there is nothing that says
> BITSIZE(CHAR) == 8).
Well, if so I could rewrite some code to define as BITS 16 FOR WIDECHAR
Perhaps that would be the way to go.
However as Rodney M. Bates has said current WIDECHAR is not BITS 16 for
It uses LE encoding rather than host order encoding a fact which one
could be quite
happy about when it comes to extend Trestle/X11 for widechar support. So
would fail when it came to interface with X11 (or otherwise one would
have to maintain
two branches of code all the time; one that does byte swapping and one
that does not
depending on the host order AND the internally used wchar order which
differ as well.).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel