bug-ncurses
[Top][All Lists]
Advanced

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

Re: Line-drawing constants


From: Ian Lynagh
Subject: Re: Line-drawing constants
Date: Wed, 17 Jul 2002 16:20:22 +0100
User-agent: Mutt/1.3.25i

On Wed, Jul 17, 2002 at 10:43:16AM -0400, Thomas Dickey wrote:
> On Wed, Jul 17, 2002 at 02:11:25PM +0100, Ian Lynagh wrote:
> > 
> > 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.

OK, I will work on the assumption that what ncurses does is valid then
and work around it.

> > 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?

It can access C arrays if it knows they are C arrays, but the spec
doesn't allow this assumption either. What I will probably have to do is
to write a C function

chtype wrap_ACS_BLOCK(void) {
    return ACS_BLOCK;
}

which is messy in the first instance and also means that (this probably
won't make sense if you don't know anything about Haskell) I'll need to
be in the IO monad to look at the value - which makes sense really given
it isn't referentially transparent as it's not actually a constant.

Oh well, c'est la vie  :-)


Thanks
Ian




reply via email to

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