Skip to content
Commit e0b42605 authored by Dirk Gouders's avatar Dirk Gouders Committed by Yann E. MORIN
Browse files

nconf: use function calls instead of ncurses' variables LINES and COLS



According to the documentation [1], LINES and COLS are initialized by
initscr(); it does not say anything about the behavior when windows are
resized.

Do not rely on the current implementation of ncurses that updates
these variables on resize, but use the propper function calls or macros
to get window dimensions.

The use of the variables in main() was OK, but for the sake of
consistency it was modified to use the macro getmaxyx().

[1] ncurses(3X)

Signed-off-by: default avatarDirk Gouders <dirk@gouders.net>
Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: declare 'lines' and 'columns' on a single line]
Signed-off-by: default avatarYann E. MORIN <yann.morin.1998@free.fr>
parent 4f2de3e1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment