Remove globals 'li' and 'co' in term.c

These globals were used to store the original terminal dimesions from the terminal database (or
in the case of reattaching, supplied by scr-bx) to be applied if the current terminal dimensions
could not be determined.

Instead, we leave the original terminal dimensions in current_term->TI_lines and current_term->TI_cols,
and create current_term->li and current_term->co to store the current terminal dimensions (as eg.
supplied by scr-bx).
This commit is contained in:
Kevin Easton
2017-09-15 17:15:24 +10:00
parent c9b0e654b5
commit 70ac43ce77
8 changed files with 67 additions and 64 deletions

View File

@@ -3174,8 +3174,8 @@ void winbx_init(void)
ShowWindow(HVTWin, SW_SHOWDEFAULT);
ChangeCaret();
current_term->TI_cols = co = 81;
current_term->TI_lines = li = 25;
current_term->co = current_term->TI_cols = 81;
current_term->li = current_term->TI_lines = 25;
#if 0
while (GetMessage(&msg,NULL,0,0)) {
@@ -3325,7 +3325,7 @@ void gui_resize(Screen *this_screen)
/*cx = this_screen->co * this_screen->VIO_font_width;
cy = this_screen->li * this_screen->VIO_font_height;*/
co = this_screen->co; li = this_screen->li;
current_term->co = this_screen->co; current_term->li = this_screen->li;
/* Recalculate some stuff that was done in input.c previously */
this_screen->input_line = this_screen->li-1;