/* TUI window generic functions.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
#include <ctype.h>
#include "readline/readline.h"
+#include <signal.h>
+
/*******************************
** Static Local Decls
********************************/
tui_set_win_resized_to (TRUE);
}
+/* Initializes SIGWINCH signal handler for the tui. */
+void
+tui_initialize_win (void)
+{
+#ifdef SIGWINCH
+#ifdef HAVE_SIGACTION
+ struct sigaction old_winch;
+ memset (&old_winch, 0, sizeof (old_winch));
+ old_winch.sa_handler = &tui_sigwinch_handler;
+ sigaction (SIGWINCH, &old_winch, NULL);
+#else
+ signal (SIGWINCH, &tui_sigwinch_handler);
+#endif
+#endif
+}
/*************************