[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ugly tinfo ABI problem

From: Thomas Dickey
Subject: Re: ugly tinfo ABI problem
Date: Tue, 18 Jan 2005 09:55:47 -0500 (EST)

On Tue, 18 Jan 2005, Stanislav Ievlev wrote:

On Tue, Jan 18, 2005 at 06:39:37AM -0500, Thomas Dickey wrote:
On Mon, 17 Jan 2005, Stanislav Ievlev wrote:

In current snapshot libtinfo and libtinfow are binary incompatible,
because structures "screen" and "SLK" use NCURSES_CH_T type.

(having had some time to recall the pieces, I see why it's not a problem).

The struct's declared in curses.priv.h are all secrets of libncurses and
its variations.  They're passed around as pointers; the application cannot
(unless it includes curses.priv.h, which is against the rules) know the
size of these.  So the ABI hasn't changed.  I've made several changes over
the past 4-5 years within those guidelines.

Unfortunately, problem not in tinfo ABI.
Problem is in scheme we want to have:
ncursesw+tinfo (note that tinfo are without "w").

yes, I understand that - have to consider the pros/cons.

ncurses and ncursesw libraries both use internal screen structure, and
depends of member offsets in it.

It's possible a misdesign, that hight level libraries not use general public interface.

That's possible - though I'm not sure that I could improve upon the design. When I set up tinfo, I didn't want to do more than move functions and data that directly relied upon terminfo into that library. However as you note, some details from the upper levels (such as the soft-keys) are part of the SCREEN struct.

Thinking along those lines, I suppose it is possible to put the upper-level data into a struct-pointer that SCREEN doesn't know about, which would allow one to make a tinfo which doesn't have the pointer to SLK data. I'm not sure how much work that would be, or if there is some other dependency that would prevent it. But there's still the attribute (plus color) information that's the SCREEN's notion of background (used in vidputs, etc).

A grep shows "_slk" used only in ncurses/base, so that looks promising. And _current_attr is only in ncurses/base, ncurses/tty, so those are not in tinfo as such. If it's as simple as that, I suppose I could abandon the items in SCREEN which refer to the old data, and add on the end new items - but that of course is an ABI change (but with the possibility of making tinfo sharable between the different flavors).

I'll look into that and see if that's workable.

Of course any ABI change simply annoys those people who've hardcoded into
their documents filenames such as libncurses.so.5 - I was assuming I could
put that off til later.

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]