[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable menu and forms libraries
From: |
Thomas Dickey |
Subject: |
Re: Portable menu and forms libraries |
Date: |
Sun, 21 Jul 2024 06:02:46 -0400 |
On Sat, Jul 20, 2024 at 09:14:00PM -0400, Bill Gray wrote:
> Hello all,
>
> I'm occasionally asked about providing these two libraries for PDCurses
> and/or PDCursesMod. I've never used either library and have only a
> superficial knowledge of them.
>
> I have no desire to re-invent either (they're pretty substantial libraries).
> I'm looking for lazier ways of doing it. Two occur to me :
>
> (1) The versions of these libraries that are provided with ncurses make use
> of internal ncurses functions. I could (I think) modify the code so that it
offhand, I see (aside from the trace functions) curses.priv.h included
to provide _nc_screen_of and _nc_wcrtomb, which could be polished and given
a generic name via a #define - and the former is used only for the _sp
functions.
The various trace calls are all macros, which could be stubbed out in
pdcurses to mock up a curses.priv.h
But I haven't tried making a pdcurses-style "curses.priv.h" to see what
else is going to be a problem :-)
> just uses Plain Old Curses functions, and the libraries would then (at least
> in theory) work with any curses library. Such changes might well be done
> along the lines of
>
> #ifdef NCURSES_VERSION
> /* do things the way they're currently done */
> #else
> /* do things portably to any curses library */
> #endif
>
> in hopes of not actually forking Thomas' code. (In some cases, I might
> instead implement PDCursesMod versions of those ncurses functions.)
>
> (2) Or, I could use some other implementation of these libraries. They, too,
> might conceivably be bound to a particular flavor of curses, but might be
> easier to modify to work with any curses library.
>
> The resulting menu and forms libraries would, of course, still be under the
> original license, even though they'd be calling (public domain) PDCurses or
> PDCursesMod. I suppose some people would prefer fully public domain
> libraries, but if so... they can go ahead and write 'em.
>
> Any thoughts?
>
> Thanks! -- Bill
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature