comparison mcabber/src/screen.c @ 966:d9acb7f2a3d1

Do not set Curses variable too early This patch fixes a freeze when scr_LogPrint() is called before ncurses are fully initialized, for example when the colors are wrong in the config file. Problem reported by Jeff~ in the mcabber MUC room.
author Mikael Berthe <mikael@lilotux.net>
date Thu, 28 Sep 2006 21:36:58 +0200
parents 95659cf9ea1a
children 303408ef5e5d fc6060707022
comparison
equal deleted inserted replaced
965:1bdf0f1b16c0 966:d9acb7f2a3d1
303 noecho(); 303 noecho();
304 nonl(); 304 nonl();
305 intrflush(stdscr, FALSE); 305 intrflush(stdscr, FALSE);
306 start_color(); 306 start_color();
307 use_default_colors(); 307 use_default_colors();
308 Curses = TRUE;
309 308
310 ParseColors(); 309 ParseColors();
311 310
312 getmaxyx(stdscr, maxY, maxX); 311 getmaxyx(stdscr, maxY, maxX);
313 Log_Win_Height = DEFAULT_LOG_WIN_HEIGHT; 312 Log_Win_Height = DEFAULT_LOG_WIN_HEIGHT;
315 // to update Log_Win_Height and set max{X,Y} 314 // to update Log_Win_Height and set max{X,Y}
316 315
317 inputLine[0] = 0; 316 inputLine[0] = 0;
318 ptr_inputline = inputLine; 317 ptr_inputline = inputLine;
319 318
319 Curses = TRUE;
320 return; 320 return;
321 } 321 }
322 322
323 void scr_TerminateCurses(void) 323 void scr_TerminateCurses(void)
324 { 324 {