0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Fixes some potential issues with invalid term size in clients.

This commit is contained in:
Ondrej Zajicek 2013-11-20 13:25:33 +01:00
parent 33be3ba713
commit 4d4979c67c
3 changed files with 6 additions and 7 deletions

View File

@ -148,8 +148,8 @@ input_init(void)
rl_callback_handler_install("bird> ", input_got_line); rl_callback_handler_install("bird> ", input_got_line);
// rl_get_screen_size(); // rl_get_screen_size();
term_lns = LINES ? LINES : 25; term_lns = LINES;
term_cls = COLS ? COLS : 80; term_cls = COLS;
prompt_active = 1; prompt_active = 1;

View File

@ -150,11 +150,6 @@ input_init(void)
term_lns = tws.ws_row; term_lns = tws.ws_row;
term_cls = tws.ws_col; term_cls = tws.ws_col;
} }
else
{
term_lns = 25;
term_cls = 80;
}
} }
void void

View File

@ -178,6 +178,10 @@ init_commands(void)
} }
input_init(); input_init();
term_lns = (term_lns > 0) ? term_lns : 25;
term_cls = (term_cls > 0) ? term_cls : 80;
init = 0; init = 0;
} }