slang-users mailing list

[2001 Date Index] [2001 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: slcurses wgetch() behavior


On Fri, Oct 12, 2001 at 12:17:05AM -0400, Glenn Maynard wrote:
> On Thu, Oct 11, 2001 at 04:07:28PM -0400, John E. Davis wrote:
> > >slcurses getch() appears to eat unknwon escape sequences, returning ERR.
> > >This breaks a lot of keys in mutt when compiled with slang.  I'd
> > >recommend emulating the ncurses behavior when going through the ncurses
> > >interface.
> > 
> > I am not sure what you mean by "when going through the ncurses
> > interface".  S-Lang does not depend upon ncurses nor does it use any
> > of its functions.  It simply replies upon the existence of the
> > terminfo database.
> 
> I'm talking about slcurses; the ncurses-compatibility interface for
> slang.  Of course, I don't expect perfect emulation for the more obscure
> behavior of ncurses, but this is a pretty notable difference.
> 
> Here's a patch.  It's a mild hack, but straightforward: add a function
> pointer to ungetkey; when it's set (only by slcurses), unknown key
> sequences are stuffed back in the buffer and SLkp_getkey doesn't flush.
> 
> > As far as binding arbitraty key sequences to keys. this can be done
> > using the SLkp_define_kesym function.  It associates an arbitray
> > keysym to a key sequence.  Then SLkp_getkey will return the keysym
> > when the key is pressed (getch is a wrapper around getch).
> 
> Well, I'm compiling mutt with slang, which uses the ncurses interface.
> (Doing this to get sane UTF-8.)  It expects getch() to return unknown
> escape sequences literally.  (Of course, nobody expects emulated APIs to
> be perfect, but this is a fairly significant difference.)
>  
> No comment on $TERMCAP?  It caused me quite a headache; since I assumed
> slang behaved like ncurses and always used terminfo, I didn't even think
> to check it.  It's quite useless on terminfo systems ...  (Of course,
> the real problem was screen's fault, not slang's.)

*sigh* I guess slang's not really being actively maintained anymore.  I'd
appreciate it if you'd at least say so, so I'm not awaiting a response
indefinitely.

-- 
Glenn Maynard


[2001 date index] [2001 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]