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

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Dec 12 11:02:04 EST 2002


On Wed, 11 Dec 2002, Glynn Clements wrote:

>
> Paul Kelly wrote:
>
> > > > > The only problem is the Escape and Return keys not working when run from
> > > > > an IRIX winterm. I at least should have proposed a change to the README on
>
> Look for HAVE_KEYPAD in src/include/config.h; if it isn't defined,
> look for an appropriate error message in config.log; search for the
> string "checking for keypad".

Yes, the line
#define HAVE_KEYPAD 1
is present in src/include/config.h

> The most significant change between 5.0.0 and CVS is that configure
> checks for the existence of keypad(), and the vask library only uses
> it if it's detected.

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"

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

Paul




More information about the grass-dev mailing list