[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NCurses APIs available for use
From: |
Zaki, Ahmed |
Subject: |
Re: NCurses APIs available for use |
Date: |
Fri, 26 Apr 2024 10:53:44 +0000 |
Thank you Thomas for the clarification.
I understand it is not uncommon to have exported symbols not part of the API.
My question was perhaps whether this is intentional in the case of nurses or
not.
I understand from what you mention that indeed it’s by design.
I merely ran nm <shared_lib> | grep “ T “ to get the exported symbols and came
across many of the “_nc_” symbols.
I believe their were around 748 symbols exported.
Wanted to check if all of them need to be exported or would there be benefit in
removing some from the list.
Thanks
> On 26 Apr 2024, at 00:24, Thomas Dickey <dickey@his.com> wrote:
>
>
> *******************
> This email originates from outside Imperial. Do not click on links and
> attachments unless you recognise the sender.
> If you trust the sender, add them to your safe senders list
> https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for
> this address.
> *******************
> On Thu, Apr 25, 2024 at 09:19:09PM +0000, Zaki, Ahmed wrote:
>> Hi,
>>
>> I am trying to get a definitive list of APIs available for use from Ncurses.
>
> API means "application programming interface".
>
>> I looked at the man pages but one thing I found was that many functions are
>> exported from the shared library which are not documented.
>
> sure - that's an implementation detail, not part of the "application
> programming interface".
>
>> I am referring to functions that have the prefix “_nc_” .
>>
>> Are those functions intended to be exported by the shared library ?
>
> Some are exported, to be used by the ncurses utilities (tic, infocmp,
> tset, tabs, clear). Since those are part of ncurses, they're not
> limited to the "application programming interface".
>
> Some are exported from one module of the library to another.
> Again, not part of the "application programming interface".
>
> If using versioned symbols, many of the _nc_ names are hidden -
> and the ones which are not, are exported as a detail of ncurses's
> implementation. The trace- and memleaks-manpages mention a few
> of these, but they're solely of use to developers who build their
> own copy of ncurses, for analyzing problems which may or may not
> result in an update to ncurses. The purpose and parameters to any
> of these symbols can change without affecting application developers.
>
> Along those lines, a third of the symbols (900 of 2953) exported by glibc
> are likewise not part of its API.
>
> --
> Thomas E. Dickey <dickey@invisible-island.net>
> https://invisible-island.net