]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 5.7 - patch 20090613
[ncurses.git] / ncurses / tinfo / lib_setup.c
index 9968083c9ff10cb91448ff480696ced5d4318a63..2cab9baf18ffcd0df5a9194d60e6c888cee1e43c 100644 (file)
@@ -54,7 +54,7 @@
 
 #include <term.h>              /* lines, columns, cur_term */
 
 
 #include <term.h>              /* lines, columns, cur_term */
 
-MODULE_ID("$Id: lib_setup.c,v 1.114 2009/04/18 23:52:03 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.117 2009/06/06 17:56:31 tom Exp $")
 
 /****************************************************************************
  *
 
 /****************************************************************************
  *
@@ -117,35 +117,40 @@ NCURSES_PUBLIC_VAR(ttytype) (void)
     return cur_term ? cur_term->type.term_names : empty;
 }
 NCURSES_EXPORT(int *)
     return cur_term ? cur_term->type.term_names : empty;
 }
 NCURSES_EXPORT(int *)
-_nc_ptr_Lines(void)
+_nc_ptr_Lines(SCREEN *sp)
 {
 {
-    return ptrLines(CURRENT_SCREEN);
+    return ptrLines(sp);
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(LINES) (void)
 {
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(LINES) (void)
 {
-    return *_nc_ptr_Lines();
+    return *_nc_ptr_Lines(CURRENT_SCREEN);
 }
 NCURSES_EXPORT(int *)
 }
 NCURSES_EXPORT(int *)
-_nc_ptr_Cols(void)
+_nc_ptr_Cols(SCREEN *sp)
 {
 {
-    return ptrCols(CURRENT_SCREEN);
+    return ptrCols(sp);
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(COLS) (void)
 {
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(COLS) (void)
 {
-    return *_nc_ptr_Cols();
+    return *_nc_ptr_Cols(CURRENT_SCREEN);
+}
+NCURSES_EXPORT(int *)
+_nc_ptr_Tabsize(SCREEN *sp)
+{
+    return ptrTabsize(sp);
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(TABSIZE) (void)
 {
 }
 NCURSES_EXPORT(int)
 NCURSES_PUBLIC_VAR(TABSIZE) (void)
 {
-    return SP ? SP->_TABSIZE : 8;
+    return *_nc_ptr_Tabsize(CURRENT_SCREEN);
 }
 #else
 NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
 NCURSES_EXPORT_VAR(int) LINES = 0;
 NCURSES_EXPORT_VAR(int) COLS = 0;
 }
 #else
 NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
 NCURSES_EXPORT_VAR(int) LINES = 0;
 NCURSES_EXPORT_VAR(int) COLS = 0;
-NCURSES_EXPORT_VAR(int) TABSIZE = 0;
+NCURSES_EXPORT_VAR(int) TABSIZE = 8;
 #endif
 
 #if NCURSES_EXT_FUNCS
 #endif
 
 #if NCURSES_EXT_FUNCS
@@ -342,7 +347,7 @@ _nc_update_screensize(SCREEN *sp)
     if (sp != 0
        && sp->_resize != 0) {
        if ((new_lines != old_lines) || (new_cols != old_cols))
     if (sp != 0
        && sp->_resize != 0) {
        if ((new_lines != old_lines) || (new_cols != old_cols))
-           sp->_resize(new_lines, new_cols);
+           sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
        sp->_sig_winch = FALSE;
     }
 }
        sp->_sig_winch = FALSE;
     }
 }