bug-ncurses
[Top][All Lists]
Advanced

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

Re: Line-drawing constants


From: Thomas Dickey
Subject: Re: Line-drawing constants
Date: Wed, 17 Jul 2002 10:43:16 -0400
User-agent: Mutt/1.2.5i

On Wed, Jul 17, 2002 at 02:11:25PM +0100, Ian Lynagh wrote:
> On Wed, Jul 17, 2002 at 08:19:15AM -0400, Thomas Dickey wrote:
> > 
> > ncurses's definitions were based on SVr4 header files, which use an
> > array. Checking, I see that Solaris' xpg4 header files do use a
> > constant here as you've indicated (while the legacy curses doesn't do
> > that).  Perhaps what I'll do is modify the ncurses headers so that if
> > _XOPEN_SOURCE_EXTENDED is defined, it would use the constants - but
> > retain the other definitions for legacy apps.
> 
> Would it not be possible to switch to using constants by default but
> still export (and overwrite etc) the acs_map array for programs compiled
> against an older version of the library? And then acs_map could
> completely dropped in ncurses6. Even people being naughty and doing
> things like ACS_BLOCK + 1 ought to be unaffected.

Probably not - there are a number of programs that use acs_map[] directly.
Taking it out of the header files would be awkward.
 
> > > My reason for emailing is that I am writing code in Haskell and your
> > > interpretation is making the curses interfacing quite inconvenient.
> > > Do you believe it is a legitimate interpretation of the standard?
> > 
> > I suppose so - but I think you'll find you would have to solve the
> > same issue with other versions of curses.
> 
> By "I suppose so" do you mean you suppose it is legitimate? It
> doesn't seem to quite fit with what you are replying to.

It's possible that the intent of the X/Open document was that it refer to
constants - but I've found Tru64 to be a pretty good indication of the
intent (probably because people working on that system had some influence
on the documentation).  Solaris lags that, but generally still conforms.
Lacking another implementation which makes the ACS_xxx values constants,
it's hard to say that the interpretion couldn't be that.
 
> I'm not actually worried about whether it is portable in practise - it
> is really an experiment/proof of concept app rather than one I expect to
> really be used. However I would like it to work in the common

can't Haskell reference the array at all?

> environments (of those interested) and to comply with all the relevant
> standards, so ncurses working how I expected (or my reading of the
> standard being corrected if applicable) would be a great help.

well any changes now won't be generally used until ncurses 5.3 is done
(barring packagers like Redhat of course ;-).  If I make it too incompatible,
downstream packagers tend to hack in the first "fix" that comes up on
the keyboard.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net



reply via email to

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