On Wed, 6 Sep 2000, Bruno Haible wrote:

> Thomas Dickey writes:
> 
> > no - storing the attributes+color in the same 32-bit word limits us to
> > 16-bit characters. OSF1/.../Tru64 uses a struct, which looks like the
> > only way to do this within the X/Open spec.  I'm considering making
> > macros that hide the difference and adding configuration to generate
> > wide- and normal libraries.
> 
> Is there any reason to do things differently than in the X/Open spec?

it's hard to say "differently" when the X/Open spec is especially vague
in this area - that spec is written with some implementations in mind,
but refraining from providing too many details: so unless I look at the
implementations, the spec isn't complete.
 
> That spec is based on the cchar_t type, which contains the information
> about one screen cell (or two adjacent cells, in case of a
> double-width character). It must contain the base character,
> additional combining characters - how else could you display Thai? -
> and of course a foreground and a background color.
> 
> It's not worth discussing the number of bits needed to represent a

...but it's worth keeping in mind for small/embedded applications.
(and the other aspect - source compatibility would be broken in a number
of applications which assume they can OR attributes onto a character).

> screen cell. The entire screen will normally be less than 132x50
> cells. It won't a big difference to programs whether that uses 3 KB or
> 15 KB.
> 
> The hard thing is that, according to the spec, you can use a simple
> 'char' in one cell and a 'cchar_t' in the next one. This implies
> conversion between 'char' and 'wchar_t' which you may want to avoid in
> the normal (char-only) library.

there's really no conversion per se - there are calls for char and cchar_t
which store data into the same screen representation, so the char
functions are a subset of the total api. I had in mind implementing the
cchar_t functions so they would only be built if the cchar_t is not really
a char, anyway.

-- 
T.E.Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to