]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_newterm.c
ncurses 5.5
[ncurses.git] / ncurses / base / lib_newterm.c
index 8d6dd97e001cc38a7693f8be43d53263fc57f5d1..ad7b122be8ad1baecee24607cd0ade96c2e8f41c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,6 +29,7 @@
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
+ *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
 /*
@@ -47,7 +48,7 @@
 #include <term.h>              /* clear_screen, cup & friends, cur_term */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_newterm.c,v 1.56 2002/10/12 15:24:08 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.58 2004/08/14 20:36:39 tom Exp $")
 
 #ifndef ONLCR                  /* Allows compilation under the QNX 4.2 OS */
 #define ONLCR 0
@@ -102,7 +103,7 @@ filter(void)
 }
 
 NCURSES_EXPORT(SCREEN *)
-newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp)
+newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
 {
     int errret;
     int slk_format = _nc_slk_format;
@@ -119,13 +120,6 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp)
     if (filter_mode) {
        LINES = 1;
 
-       if (VALID_NUMERIC(init_tabs))
-           TABSIZE = init_tabs;
-       else
-           TABSIZE = 8;
-
-       T(("TABSIZE = %d", TABSIZE));
-
        clear_screen = 0;
        cursor_down = parm_down_cursor = 0;
        cursor_address = 0;
@@ -205,5 +199,13 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp)
 
     _nc_signal_handler(TRUE);
 
+#if USE_SIZECHANGE
+    /*
+     * Pretend we received a SIGWINCH, just in case we're starting up in a
+     * terminal that cannot initialize its size properly (Debian #265631).
+     */
+    SP->_sig_winch = TRUE;
+#endif
+
     returnSP(SP);
 }