[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminfo and terminfow libraries
From: |
Thomas Dickey |
Subject: |
Re: terminfo and terminfow libraries |
Date: |
Fri, 30 Jan 2004 06:53:04 -0500 (EST) |
On Fri, 30 Jan 2004, Stanislav Ievlev wrote:
> On Wed, Jan 28, 2004 at 08:16:20AM -0500, Thomas Dickey wrote:
> > On Wed, 28 Jan 2004, Stanislav Ievlev wrote:
> >
> > > Hello, friends!
> > >
> > > Why ncurses needs two version of lowlevel terminfo library:
> > > with widechar support and without widechar support?
> > >
> > > It's better for vendors to have single terminfo library, when this
> > > library is used as a replacement of old termcap library.
> >
> > I suppose so (hadn't considered it). Will add to to-do list for 5.5
> JFYI:
> We (ALT) have made little research for this problem, 'cause we use tinfo
> instead of termcap and can't wait for 5.5.
I'll take a closer look at the makefile issues, but don't want to make
complicated changes right now (they tend to be a source of problems).
> We try to use libtinfow as a single library both for libncurses and for
> libncursesw.
> We compare libtinfo and libtinfow for API/ABI (checking both compiled object
> files, preprocessor results and assembler code). There are following results
> below:
>
> 1.(not a problem) libtinfow added new symbol key_name
> 2.(not a problem) libtinfow added new functions _nc_unicode_locale() and
> _nc_locale_breaks_acs().
> Added code are little and will work both in wide-char and non-wide-char
> versions.
>
> --
> if (_nc_unicode_locale() && _nc_locale_breaks_acs()) {
> acs_chars = NULL;
> ena_acs = NULL;
> }
> --
I seem to recall some issues in the extra code - would have to study that.
>
> 3. (problem). _nc_outch() functions use screen structure. This structure
> is differ in unicode and non-unicode versions (different offsets for the
> common fields):
...
> As a result we have different code , when some code work with _cleanup and
> _outchar fields, because they have different offset in unicode and
> non-unicode versions.
>
> As I see this "#if", was added _only_ in 5.4 version. So we have a chance to
> fix this problem, by replacing added elements to the end of structure.
I hadn't thought of it as a problem (it's easy to remove the "#" lines).
>
> If _posix_locale and _screen_acs_fix live at the end of struct, following
> code in _nc_outch will same in unicode and non-unicode versions.
>
> --
> ...
> if (SP != 0
> && SP->_cleanup) {
> ...
> --
>
> Patch, we made for our distribution you can find in attach.
>
> Results: after fixing of the problem #3 you can easy made single version
> of the libtinfo both for unicode and non-unicode ncurses.
>
> --
> With best regards
> Stanislav Ievlev
>
>
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net