]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20090906
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 6 Sep 2009 18:03:59 +0000 (18:03 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 6 Sep 2009 18:03:59 +0000 (18:03 +0000)
+ fix typo s/is_timeout/is_notimeout/ which made "man is_notimeout" not
  work.
+ add null-pointer checks to other opaque-functions.
+ add is_pad() and is_subwin() functions for opaque access to WINDOW
  (discussion with Mark Dickinson).
+ correct merge to lib_newterm.c, which broke when sp-funcs was
  enabled.

NEWS
dist.mk
include/curses.h.in
man/curs_opaque.3x
ncurses/base/lib_newterm.c
ncurses/base/lib_newwin.c

diff --git a/NEWS b/NEWS
index d5957d2287b46596b4a01663f4904b19001d8a24..bc68b6720fd14904a5ee4fbec4650cbc114886ff 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1428 2009/09/05 17:51:48 tom Exp $
+-- $Id: NEWS,v 1.1430 2009/09/06 16:03:13 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,15 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20090906
+       + fix typo s/is_timeout/is_notimeout/ which made "man is_notimeout" not
+         work.
+       + add null-pointer checks to other opaque-functions.
+       + add is_pad() and is_subwin() functions for opaque access to WINDOW
+         (discussion with Mark Dickinson).
+       + correct merge to lib_newterm.c, which broke when sp-funcs was
+         enabled.
+
 20090905
        + build-fix for building outside source-tree (report by Sven Joachim).
        + fix Debian lintian warning for man/tabs.1 by making section number
diff --git a/dist.mk b/dist.mk
index bba8c5659599649a3ea271d743a56431bbaf76aa..ee0b9fa4dbf5fd68c434a3acd255bedc61a0263b 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.718 2009/08/30 18:12:44 tom Exp $
+# $Id: dist.mk,v 1.719 2009/09/06 14:11:10 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 7
-NCURSES_PATCH = 20090905
+NCURSES_PATCH = 20090906
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index f2c5a15489b5368228f4354b75bdec3dfe87cdb0..baa95fa4145275a02012d3f736b350a952aa1ac9 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.205 2009/08/29 18:33:18 tom Exp $ */
+/* $Id: curses.h.in,v 1.206 2009/09/06 15:55:10 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -878,7 +878,9 @@ extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);             /* @GENERATED_EXT_FUNCS
 extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);       /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);     /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_pad (const WINDOW *);           /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);      /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);                /* @GENERATED_EXT_FUNCS@ */
 extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
 
@@ -1273,16 +1275,18 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
  */
 #if @NCURSES_EXT_FUNCS@
 #if !NCURSES_OPAQUE
-#define is_cleared(win)                ((win)->_clear)
-#define is_idcok(win)          ((win)->_idcok)
-#define is_idlok(win)          ((win)->_idlok)
-#define is_immedok(win)                ((win)->_immed)
-#define is_keypad(win)         ((win)->_use_keypad)
-#define is_leaveok(win)                ((win)->_leaveok)
-#define is_nodelay(win)                ((win)->_delay == 0)
-#define is_notimeout(win)      ((win)->_notimeout)
-#define is_scrollok(win)       ((win)->_scroll)
-#define is_syncok(win)         ((win)->_sync)
+#define is_cleared(win)                ((win) ? (win)->_clear : FALSE)
+#define is_idcok(win)          ((win) ? (win)->_idcok : FALSE)
+#define is_idlok(win)          ((win) ? (win)->_idlok : FALSE)
+#define is_immedok(win)                ((win) ? (win)->_immed : FALSE)
+#define is_keypad(win)         ((win) ? (win)->_use_keypad : FALSE)
+#define is_leaveok(win)                ((win) ? (win)->_leaveok : FALSE)
+#define is_nodelay(win)                ((win) ? ((win)->_delay == 0) : FALSE)
+#define is_notimeout(win)      ((win) ? (win)->_notimeout : FALSE)
+#define is_pad(win)            ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
+#define is_scrollok(win)       ((win) ? (win)->_scroll : FALSE)
+#define is_subwin(win)         ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
+#define is_syncok(win)         ((win) ? (win)->_sync : FALSE)
 #define wgetparent(win)                ((win) ? (win)->_parent : 0)
 #define wgetscrreg(win,t,b)    ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
 #endif
index 6c9cfaa18a35164dfcd3250c7b1a7cc03310a48b..7a9e049c515b7e7539ab19794696b62e6751f255 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 2007 Free Software Foundation, Inc.                        *
+.\" Copyright (c) 2007,2009 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            *
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_opaque.3x,v 1.6 2007/09/08 18:49:13 tom Exp $
+.\" $Id: curs_opaque.3x,v 1.7 2009/09/06 16:01:55 tom Exp $
 .TH curs_opaque 3X ""
 .na
 .hy 0
 \fBis_keypad\fR,
 \fBis_leaveok\fR,
 \fBis_nodelay\fR,
-\fBis_timeout\fR,
+\fBis_notimeout\fR,
+\fBis_pad\fR,
 \fBis_scrollok\fR,
+\fBis_subwin\fR,
 \fBis_syncok\fR - \fBcurses\fR window properties
 .ad
 .hy
 .br
 \fBbool is_notimeout(const WINDOW *win);\fR
 .br
+\fBbool is_pad(const WINDOW *win);\fR
+.br
 \fBbool is_scrollok(const WINDOW *win);\fR
 .br
+\fBbool is_subwin(const WINDOW *win);\fR
+.br
 \fBbool is_syncok(const WINDOW *win);\fR
 .br
 \fBWINDOW * wgetparent(const WINDOW *win);\fR
@@ -99,9 +105,17 @@ returns the value set in \fBnodelay\fR
 \fBis_notimeout\fR
 returns the value set in \fBnotimeout\fR
 .TP 5
+\fBis_pad\fR
+returns TRUE if the window is a pad
+i.e., created by \fBnewpad\fP
+.TP 5
 \fBis_scrollok\fR
 returns the value set in \fBscrollok\fR
 .TP 5
+\fBis_subwin\fR
+returns TRUE if the window is a subwindow,
+i.e., created by \fBsubwin\fP or \fBderwin\fP
+.TP 5
 \fBis_syncok\fR
 returns the value set in \fBsyncok\fR
 .TP 5
index e09b8409d9745c15d9501339f2241e6d1b75f0d3..a88460d46f5740bb7459219f9e7315fa98c793e2 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: lib_newterm.c,v 1.78 2009/08/30 19:02:28 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.79 2009/09/06 15:13:41 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels      InfoOf(SP_PARM).numlabels
@@ -220,6 +220,8 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
        } else {
 #ifdef USE_TERM_DRIVER
            TERMINAL_CONTROL_BLOCK *TCB;
+#else
+           SP_PARM = CURRENT_SCREEN;
 #endif
            assert(SP_PARM != 0);
            cols = *(ptrCols(SP_PARM));
@@ -243,7 +245,7 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
                current->_term = its_term;
 
            /* if the terminal type has real soft labels, set those up */
-           if (slk_format && num_labels > 0 && SLK_STDFMT(slk_format))
+           if (slk_format && NumLabels > 0 && SLK_STDFMT(slk_format))
                _nc_slk_initialize(stdscr, COLS);
 
            SP_PARM->_ifd = fileno(_ifp);
index 14beb65ae6855cd033f27faeda9a1290f1737cc4..3ab466ab9575871b00f809561c51b4255469d603 100644 (file)
@@ -43,7 +43,7 @@
 #include <curses.priv.h>
 #include <stddef.h>
 
-MODULE_ID("$Id: lib_newwin.c,v 1.59 2009/08/30 16:35:23 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.60 2009/09/06 16:32:48 tom Exp $")
 
 #define window_is(name) ((sp)->_##name == win)
 
@@ -259,7 +259,7 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
     int i;
     WINDOWLIST *wp;
     WINDOW *win;
-    bool is_pad = (flags & _ISPAD);
+    bool is_padwin = (flags & _ISPAD);
 
     T((T_CALLED("_nc_makenew(%p,%d,%d,%d,%d)"),
        SP_PARM, num_lines, num_columns, begy, begx));
@@ -294,7 +294,7 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
     WINDOW_ATTRS(win) = A_NORMAL;
     SetChar(win->_nc_bkgd, BLANK_TEXT, BLANK_ATTR);
 
-    win->_clear = (is_pad
+    win->_clear = (is_padwin
                   ? FALSE
                   : (num_lines == screen_lines(SP_PARM)
                      && num_columns == screen_columns(SP_PARM)));
@@ -346,7 +346,7 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
        if_USE_SCROLL_HINTS(win->_line[i].oldindex = i);
     }
 
-    if (!is_pad && (begx + num_columns == screen_columns(SP_PARM))) {
+    if (!is_padwin && (begx + num_columns == screen_columns(SP_PARM))) {
        win->_flags |= _ENDLINE;
 
        if (begx == 0 && num_lines == screen_lines(SP_PARM) && begy == 0)