[GRASS-dev] r.colors: rules file list unsorted

Hamish hamish_nospam at yahoo.com
Sun Jan 28 21:17:19 EST 2007


Glynn Clements wrote:
> the width of the terminal[1]
..
> [1] This is the hardest part, as there are several different ways to
> get the terminal width, and they may return different results. E.g.
> 
> 1. tigetnum("cols")
> 2. tgetnum("co")
> 3. getenv("COLUMNS")
> 4. ioctl(TIOCGWINSZ)
> 5. The "columns" macro from <term.h> (in conjuction with [n]curses).
> 6. A hardcoded default of 80 columns
> 
> #1 requires terminfo, #2 requires termcap, #3 requires that COLUMNS is
> set, #4 may not work on all platforms (although I don't know of any
> where it doesn't work), #5 requires [n]curses.
> 
> If #4 works, it should be the most reliable, as it handles the case of
> an xterm (etc) which has been resized by the user. Depending upon the
> curses implementation #5 may also use #4 if it works, or it may use #3
> (unless use_env(FALSE) has been called).


see also bug # 1107
  http://intevation.de/rt/webrt?serial_num=1107

"[grass5's] v.digit locks if the terminal is too small"



Hamish




More information about the grass-dev mailing list