[GRASS5] grass-5.0.0 on SGI IRIX 6.5 (fwd)

Glynn Clements glynn.clements at virgin.net
Fri Dec 13 01:30:09 EST 2002

Paul Kelly wrote:

> This seems a bit obvious, but neither of the files V_init.c nor V_exit.c
> in src/libes/vask include the line
> #include "config.h"

Yep, that's the problem.

> > The problems with Esc-Return suggest a bug in the curses library.
> > Calling keypad() causes the curses input routines to trap sequences
> > beginning with the ESC character and to return extended codes upon
> > receipt of a sequence which corresponds to an extended key. However,
> > the curses library is supposed to implement a timeout, and any
> > unrecognised sequences should be passed on as-is.
> >
> > The curs_inopts(3) manpage says:
> >
> >        While interpreting an input escape sequence, wgetch sets a
> >        timer  while  waiting  for the next character.  If notime­
> >        out(win, TRUE) is called,  then  wgetch  does  not  set  a
> >        timer.   The  purpose  of  the timeout is to differentiate
> >        between sequences received from a function key  and  those
> >        typed by a user.
> >
> > If your version of curses provides notimeout(), it may be worth adding
> > notimeout(win, FALSE) to see if that helps.
> Where should this go? I tried adding
> notimeout(stdscr, FALSE);
> above the statement
> newchar=getch();
> in V_call.c but there was no change in behaviour (of course I first
> re-enabled the calls to keypad(), and also tried changing getch() to
> wgetch(stdscr)). Just looks like a bug in IRIX curses then. I suppose we
> can do without the arrow keys.

The problem there is that if configure detects that you have a
keypad() function, V_init() will use it, and then Esc-Enter won't
work. There probably isn't any practical way to make configure detect
that keypad() is broken in this regard.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list