From: Thomas E. Dickey Date: Sun, 6 Sep 2009 18:03:59 +0000 (+0000) Subject: ncurses 5.7 - patch 20090906 X-Git-Tag: v5.8~72 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=ce7b402c144d2b6d3773ef5b42aad9daf1ad76fe ncurses 5.7 - patch 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. --- diff --git a/NEWS b/NEWS index d5957d22..bc68b672 100644 --- 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 bba8c565..ee0b9fa4 100644 --- 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) diff --git a/include/curses.h.in b/include/curses.h.in index f2c5a154..baa95fa4 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -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 diff --git a/man/curs_opaque.3x b/man/curs_opaque.3x index 6c9cfaa1..7a9e049c 100644 --- a/man/curs_opaque.3x +++ b/man/curs_opaque.3x @@ -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 @@ -38,8 +38,10 @@ \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 @@ -62,8 +64,12 @@ .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 diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index e09b8409..a88460d4 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -52,7 +52,7 @@ #include -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); diff --git a/ncurses/base/lib_newwin.c b/ncurses/base/lib_newwin.c index 14beb65a..3ab466ab 100644 --- a/ncurses/base/lib_newwin.c +++ b/ncurses/base/lib_newwin.c @@ -43,7 +43,7 @@ #include #include -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)