[GRASS5] [bug #1107] (grass) v.digit locks if the terminal is too small

Markus Neteler neteler at itc.it
Sat Aug 24 01:38:06 EDT 2002


On Sat, Aug 24, 2002 at 01:00:11AM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > > Maybe we should add a check for the terminal size for v.digit.
> > 
> > This I tried, but I didn't understand how to do it (curses
> > didn't give me the numbers as suggested by Glynn). An expert
> > is needed here :-)
> 
> It works fine for me. If I add the line:
> 
>     fprintf(stderr, "LINES = %d, COLS = %d\n", LINES, COLS);
> 
> to Init_curses() in dig_curses.c, it prints:
> 
> 	LINES = 24, COLS = 80
> 
> Note that v.digit doesn't initialise curses until after you have
> selected a digitiser, selected a map, and filled in the information
> screen for the map.

Ah! This is the point. I added the test too early.
 
> The variables are set by curses and, as such, aren't valid until
> curses has been initialised (by initscr(), which is called from
> V_init()).

However, it will be also strange that v.digit stops working in the middle.
To have the test at the very beginning might be more conventient.
But of course: later is better than nothing.

 Markus




More information about the grass-dev mailing list