[GRASS-dev] WinGRASS curses issue

Glynn Clements glynn at gclements.plus.com
Thu Nov 1 22:12:48 EDT 2007


Moritz Lennert wrote:

> I found the problem:
> 
> I don't know why but pushing enter gives a CR (carriage return) the very
> first time, but from then on always gives NL (newline). But V_call only
> checked for the first.

This is supposed to be handled by the nonl() and nl() calls in
V_init() and V_exit() respectively. The input loop in V_call() should
only ever see CR:

       The nl and nonl routines control whether the underlying display  device
       translates  the return key into newline on input, and whether it trans-
       lates newline into return and line-feed on output (in either case,  the
       call  addch('\n')  does  the  equivalent of return and line feed on the
       virtual screen).  Initially, these translations do occur.  If you  dis-
       able  them  using  nonl,  curses will be able to make better use of the
       line-feed capability, resulting in faster cursor motion.  Also,  curses
       will then be able to detect the return key.

> Fixed in cvs:

The fix won't hurt anything.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list