Subject: Re: [Summer of Code]Wide Character Support in curses
To: Thor Lancelot Simon <firstname.lastname@example.org>
From: Martin Husemann <email@example.com>
Date: 06/13/2005 08:11:11
On Sun, Jun 12, 2005 at 01:58:54PM -0400, Thor Lancelot Simon wrote:
> If this isn't done carefully it could quadruple the memory footprint of
> many curses-using programs, which would be unfortunate. Can't we use
> the wide representations only if necessary?
No, it won't quadruple the memory footprint of the program, only for each
screen/pane it uses (which I guess most programs use just a single terminal
sized one). For most programs, this will be a tiny increase compared
to the overall memory footprint.
While there are possible other storage strategies, they kill the fundamental
"x/y addressable array" assumption in curses and probably lead to ultimate
madness an maintainability problems right away.
The only option I see is to provide both 8bit and 32bit versions of the
structures and make the program tell curses (or curses figure out magically)
that we are going to use wide characters. That way only wide character enabled
programs see the increased memory footprint - but I have no estimate on the
number of programs that will stay in the 8bit group for much longer (maybe
some games can get away with that).