ncurses 5.6 - patch 20080405
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 6 Apr 2008 00:59:00 +0000 (00:59 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 6 Apr 2008 00:59:00 +0000 (00:59 +0000)
+ begin table in curs_thread.3x manpage describing the scope of data
  used by each function (or symbol) for threading analysis.
+ add null-pointer checks to setsyx() and getsyx() (prompted by
  discussion by Martin v. Lowis and Jeroen Ruigrok van der Werven on
  python-dev2 mailing list).

NEWS
dist.mk
include/curses.h.in
man/curs_threads.3x
ncurses/base/lib_newwin.c
test/README
test/test_opaque.c

diff --git a/NEWS b/NEWS
index 72ef7f0c00262ef931c3c3df3439d62f219d8703..dda1f6c3c3e15fea6d65600b228cd43d9097ed28 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.1220 2008/03/29 21:19:36 tom Exp $
+-- $Id: NEWS,v 1.1223 2008/04/05 21:46:58 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,13 @@ 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.
 
+20080405
+       + begin table in curs_thread.3x manpage describing the scope of data
+         used by each function (or symbol) for threading analysis.
+       + add null-pointer checks to setsyx() and getsyx() (prompted by
+         discussion by Martin v. Lowis and Jeroen Ruigrok van der Werven on
+         python-dev2 mailing list).
+
 20080329
        + add null-pointer checks in set_term() and delscreen().
        + move _nc_windows into _nc_globals, since windows can be pads, which
diff --git a/dist.mk b/dist.mk
index 4688427e41345de80e7a87119f1ccada40c48dd6..e592e3fcf55a14c0f870b5b3ae5c6896889544ee 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.636 2008/03/29 13:31:25 tom Exp $
+# $Id: dist.mk,v 1.637 2008/04/05 15:27:36 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 = 6
-NCURSES_PATCH = 20080329
+NCURSES_PATCH = 20080405
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 10ef798663a209179cb9fd5a39ae8703e0ff2113..deb63e3d735e300ec23973b78f0f3fa4bcbfde39 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.185 2008/03/29 20:23:15 tom Exp $ */
+/* $Id: curses.h.in,v 1.186 2008/04/05 15:30:28 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -912,17 +912,21 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
 #define getmaxyx(win,y,x)      (y = getmaxy(win), x = getmaxx(win))
 #define getparyx(win,y,x)      (y = getpary(win), x = getparx(win))
 
-#define getsyx(y,x) do { if (is_leaveok(newscr)) \
-                           (y) = (x) = -1; \
-                        else \
-                            getyx(newscr,(y), (x)); \
+#define getsyx(y,x) do { if (newscr) { \
+                            if (is_leaveok(newscr)) \
+                               (y) = (x) = -1; \
+                            else \
+                                getyx(newscr,(y), (x)); \
+                       } \
                    } while(0)
 
-#define setsyx(y,x) do { if ((y) == -1 && (x) == -1) \
-                           leaveok(newscr, TRUE); \
-                        else { \
-                           leaveok(newscr, FALSE); \
-                           wmove(newscr, (y), (x)); \
+#define setsyx(y,x) do { if (newscr) { \
+                           if ((y) == -1 && (x) == -1) \
+                               leaveok(newscr, TRUE); \
+                           else { \
+                               leaveok(newscr, FALSE); \
+                               wmove(newscr, (y), (x)); \
+                           } \
                        } \
                    } while(0)
 
index ae588c4c0290a9a6be36e9054ded31a9b842985d..d15b6f7a5c16ffa46f12cc346d2b98fcb7af408c 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_threads.3x,v 1.5 2008/03/29 20:28:12 tom Exp $
+.\" $Id: curs_threads.3x,v 1.10 2008/04/05 23:51:41 tom Exp $
 .TH curs_threads 3X ""
 .na
 .hy 0
@@ -94,6 +94,495 @@ granularity mutexes for their respective \fBWINDOW\fP and \fBSCREEN\fP
 parameters, and call a user-supplied function,
 passing it a \fIdata\fP parameter,
 and returning the value from the user-supplied function to the application.
+.\" ***************************************************************************
+.SS USAGE
+All of the ncurses library functions assume that the locale is not
+altered during operation.
+In addition,
+they use data which is maintained within a hierarchy of scopes.
+.RS
+.TP 3
+-
+global data, e.g., used in the low-level terminfo or termcap interfaces.
+.TP 3
+-
+terminal data, e.g., associated with a call to \fIset_curterm\fP.
+The terminal data are initialized when screens are created.
+.TP 3
+-
+screen data, e.g., associated with a call to \fInewterm\fP or \fIinitscr\fP.
+.TP 3
+-
+window data, e.g., associated with a call to \fInewwin\fP or \fIsubwin\fP.
+Windows are associated with screens.
+Pads are not necessarily associated with a particular screen.
+.IP
+Most curses applications operate on one or more windows within a single screen.
+.TP 3
+-
+reentrant, i.e., it uses only the data passed as parameters.
+.RE
+.PP
+This table lists the scope of data used for each symbol in the
+ncurses library when it is configured to support threading:
+.TS
+center tab(/);
+l l
+l l .
+Symbol/Scope
+=
+BC/global
+COLORS/screen (readonly)
+COLOR_PAIR/reentrant
+COLOR_PAIRS/screen (readonly)
+COLS/screen (readonly)
+ESCDELAY/screen (readonly, see \fIset_escdelay\fP)
+LINES/screen (readonly)
+PAIR_NUMBER/reentrant
+PC/global
+SP/global
+TABSIZE/screen (readonly)
+UP/global
+acs_map/screen (readonly)
+add_wch/window (stdscr)
+add_wchnstr/window (stdscr)
+add_wchstr/window (stdscr)
+addch/window (stdscr)
+addchnstr/window (stdscr)
+addchstr/window (stdscr)
+addnstr/window (stdscr)
+addnwstr/window (stdscr)
+addstr/window (stdscr)
+addwstr/window (stdscr)
+assume_default_colors/screen
+attr_get/window (stdscr)
+attr_off/window (stdscr)
+attr_on/window (stdscr)
+attr_set/window (stdscr)
+attroff/window (stdscr)
+attron/window (stdscr)
+attrset/window (stdscr)
+baudrate/screen
+beep/screen
+bkgd/window (stdscr)
+bkgdset/window (stdscr)
+bkgrnd/window (stdscr)
+bkgrndset/window (stdscr)
+boolcodes/global (readonly)
+boolfnames/global (readonly)
+boolnames/global (readonly)
+border/window (stdscr)
+border_set/window (stdscr)
+box/window (stdscr)
+box_set/window (stdscr)
+can_change_color/terminal
+cbreak/screen
+chgat/window (stdscr)
+clear/window (stdscr)
+clearok/window
+clrtobot/window (stdscr)
+clrtoeol/window (stdscr)
+color_content/screen
+color_set/window (stdscr)
+copywin/window (both source, target)
+cur_term/terminal
+curs_set/screen
+curscr/screen (readonly)
+curses_version/global (readonly)
+def_prog_mode/terminal
+def_shell_mode/terminal
+define_key/screen
+del_curterm/screen
+delay_output/screen
+delch/window (stdscr)
+deleteln/window (stdscr)
+delscreen/reentrant
+delwin/reentrant
+derwin/screen
+doupdate/screen
+dupwin/screen
+echo/screen
+echo_wchar/window (stdscr)
+echochar/window (stdscr)
+endwin/screen
+erase/window (stdscr)
+erasechar/window (stdscr)
+erasewchar/window (stdscr)
+filter/global
+flash/terminal
+flushinp/screen
+get_wch/screen (input-operation)
+get_wstr/screen (input-operation)
+getattrs/window
+getbegx/window
+getbegy/window
+getbkgd/window
+getbkgrnd/window
+getcchar/reentrant
+getch/screen (input-operation)
+getcurx/window
+getcury/window
+getmaxx/window
+getmaxy/window
+getmouse/screen (input-operation)
+getn_wstr/screen (input-operation)
+getnstr/screen (input-operation)
+getparx/window
+getpary/window
+getstr/screen (input-operation)
+getwin/screen (input-operation)
+halfdelay/screen
+has_colors/terminal
+has_ic/terminal
+has_il/terminal
+has_key/screen
+hline/window (stdscr)
+hline_set/window (stdscr)
+idcok/window
+idlok/window
+immedok/window
+in_wch/window (stdscr)
+in_wchnstr/window (stdscr)
+in_wchstr/window (stdscr)
+inch/window (stdscr)
+inchnstr/window (stdscr)
+inchstr/window (stdscr)
+init_color/screen
+init_pair/screen
+initscr/global
+innstr/window (stdscr)
+innwstr/window (stdscr)
+ins_nwstr/window (stdscr)
+ins_wch/window (stdscr)
+ins_wstr/window (stdscr)
+insch/window (stdscr)
+insdelln/window (stdscr)
+insertln/window (stdscr)
+insnstr/window (stdscr)
+insstr/window (stdscr)
+instr/window (stdscr)
+intrflush/terminal
+inwstr/window (stdscr)
+is_cleared/window
+is_idcok/window
+is_idlok/window
+is_immedok/window
+is_keypad/window
+is_leaveok/window
+is_linetouched/window
+is_nodelay/window
+is_notimeout/window
+is_scrollok/window
+is_syncok/window
+is_term_resized/terminal
+is_wintouched/window
+isendwin/screen
+key_defined/screen
+key_name/global (static data)
+keybound/screen
+keyname/global (static data)
+keyok/screen
+keypad/window
+killchar/terminal
+killwchar/terminal
+leaveok/window
+longname/screen
+mcprint/terminal
+meta/screen
+mouse_trafo/window (stdscr)
+mouseinterval/screen
+mousemask/screen
+move/window (stdscr)
+mvadd_wch/window (stdscr)
+mvadd_wchnstr/window (stdscr)
+mvadd_wchstr/window (stdscr)
+mvaddch/window (stdscr)
+mvaddchnstr/window (stdscr)
+mvaddchstr/window (stdscr)
+mvaddnstr/window (stdscr)
+mvaddnwstr/window (stdscr)
+mvaddstr/window (stdscr)
+mvaddwstr/window (stdscr)
+mvchgat/window (stdscr)
+mvcur/screen
+mvdelch/window (stdscr)
+mvderwin/window (stdscr)
+mvget_wch/screen (input-operation)
+mvget_wstr/screen (input-operation)
+mvgetch/screen (input-operation)
+mvgetn_wstr/screen (input-operation)
+mvgetnstr/screen (input-operation)
+mvgetstr/screen (input-operation)
+mvhline/window (stdscr)
+mvhline_set/window (stdscr)
+mvin_wch/window (stdscr)
+mvin_wchnstr/window (stdscr)
+mvin_wchstr/window (stdscr)
+mvinch/window (stdscr)
+mvinchnstr/window (stdscr)
+mvinchstr/window (stdscr)
+mvinnstr/window (stdscr)
+mvinnwstr/window (stdscr)
+mvins_nwstr/window (stdscr)
+mvins_wch/window (stdscr)
+mvins_wstr/window (stdscr)
+mvinsch/window (stdscr)
+mvinsnstr/window (stdscr)
+mvinsstr/window (stdscr)
+mvinstr/window (stdscr)
+mvinwstr/window (stdscr)
+mvprintw/window (stdscr)
+mvscanw/screen
+mvvline/window (stdscr)
+mvvline_set/window (stdscr)
+mvwadd_wch/window
+mvwadd_wchnstr/window
+mvwadd_wchstr/window
+mvwaddch/window
+mvwaddchnstr/window
+mvwaddchstr/window
+mvwaddnstr/window
+mvwaddnwstr/window
+mvwaddstr/window
+mvwaddwstr/window
+mvwchgat/window
+mvwdelch/window
+mvwget_wch/screen (input-operation)
+mvwget_wstr/screen (input-operation)
+mvwgetch/screen (input-operation)
+mvwgetn_wstr/screen (input-operation)
+mvwgetnstr/screen (input-operation)
+mvwgetstr/screen (input-operation)
+mvwhline/window
+mvwhline_set/window
+mvwin/window
+mvwin_wch/window
+mvwin_wchnstr/window
+mvwin_wchstr/window
+mvwinch/window
+mvwinchnstr/window
+mvwinchstr/window
+mvwinnstr/window
+mvwinnwstr/window
+mvwins_nwstr/window
+mvwins_wch/window
+mvwins_wstr/window
+mvwinsch/window
+mvwinsnstr/window
+mvwinsstr/window
+mvwinstr/window
+mvwinwstr/window
+mvwprintw/window
+mvwscanw/screen
+mvwvline/window
+mvwvline_set/window
+napms/reentrant
+newpad/reentrant
+newscr/screen (readonly)
+newterm/global
+newwin/reentrant
+nl/screen
+nocbreak/screen
+nodelay/window
+noecho/screen
+nofilter/global
+nonl/screen
+noqiflush/terminal
+noraw/screen
+notimeout/window
+numcodes/global (readonly)
+numfnames/global (readonly)
+numnames/global (readonly)
+ospeed/global
+overlay/window (both source, target)
+overwrite/window (both source, target)
+pair_content/screen
+pecho_wchar/screen
+pechochar/screen
+pnoutrefresh/screen
+prefresh/screen
+printw/window
+putp/global
+putwin/window
+qiflush/terminal
+raw/screen
+redrawwin/window
+refresh/screen
+reset_prog_mode/screen
+reset_shell_mode/screen
+resetty/terminal
+resize_term/screen
+resizeterm/screen
+restartterm/screen
+ripoffline/global (static data)
+savetty/terminal
+scanw/screen
+scr_dump/screen
+scr_init/screen
+scr_restore/screen
+scr_set/screen
+scrl/window (stdscr)
+scroll/window
+scrollok/window
+set_curterm/screen
+set_escdelay/screen
+set_tabsize/screen
+set_term/reentrant
+setcchar/reentrant
+setscrreg/window (stdscr)
+setupterm/global
+slk_attr/screen
+slk_attr_off/screen
+slk_attr_on/screen
+slk_attr_set/screen
+slk_attroff/screen
+slk_attron/screen
+slk_attrset/screen
+slk_clear/screen
+slk_color/screen
+slk_init/screen
+slk_label/screen
+slk_noutrefresh/screen
+slk_refresh/screen
+slk_restore/screen
+slk_set/screen
+slk_touch/screen
+slk_wset/screen
+standend/window
+standout/window
+start_color/screen
+stdscr/screen (readonly)
+strcodes/global (readonly)
+strfnames/global (readonly)
+strnames/global (readonly)
+subpad/window
+subwin/window
+syncok/window
+term_attrs/screen
+termattrs/screen
+termname/terminal
+tgetent/global
+tgetflag/global
+tgetnum/global
+tgetstr/global
+tgoto/global
+tigetflag/terminal
+tigetnum/terminal
+tigetstr/terminal
+timeout/window (stdscr)
+touchline/window
+touchwin/window
+tparm/global (static data)
+tputs/screen
+trace/global (static data)
+ttytype/screen (readonly)
+typeahead/screen
+unctrl/screen
+unget_wch/screen (input-operation)
+ungetch/screen (input-operation)
+ungetmouse/screen (input-operation)
+untouchwin/window
+use_default_colors/screen
+use_env/global (static data)
+use_extended_names/global (static data)
+use_legacy_coding/screen
+use_screen/reentrant
+use_window/reentrant
+vid_attr/screen
+vid_puts/screen
+vidattr/screen
+vidputs/screen
+vline/window (stdscr)
+vline_set/window (stdscr)
+vw_printw/window
+vw_scanw/screen
+vwprintw/window
+vwscanw/screen
+wadd_wch/window
+wadd_wchnstr/window
+wadd_wchstr/window
+waddch/window
+waddchnstr/window
+waddchstr/window
+waddnstr/window
+waddnwstr/window
+waddstr/window
+waddwstr/window
+wattr_get/window
+wattr_off/window
+wattr_on/window
+wattr_set/window
+wattroff/window
+wattron/window
+wattrset/window
+wbkgd/window
+wbkgdset/window
+wbkgrnd/window
+wbkgrndset/window
+wborder/window
+wborder_set/window
+wchgat/window
+wclear/window
+wclrtobot/window
+wclrtoeol/window
+wcolor_set/window
+wcursyncup/screen (affects window plus parents)
+wdelch/window
+wdeleteln/window
+wecho_wchar/window
+wechochar/window
+wenclose/window
+werase/window
+wget_wch/screen (input-operation)
+wget_wstr/screen (input-operation)
+wgetbkgrnd/window
+wgetch/screen (input-operation)
+wgetn_wstr/screen (input-operation)
+wgetnstr/screen (input-operation)
+wgetparent/window
+wgetscrreg/window
+wgetstr/screen (input-operation)
+whline/window
+whline_set/window
+win_wch/window
+win_wchnstr/window
+win_wchstr/window
+winch/window
+winchnstr/window
+winchstr/window
+winnstr/window
+winnwstr/window
+wins_nwstr/window
+wins_wch/window
+wins_wstr/window
+winsch/window
+winsdelln/window
+winsertln/window
+winsnstr/window
+winsstr/window
+winstr/window
+winwstr/window
+wmouse_trafo/window
+wmove/window
+wnoutrefresh/screen
+wprintw/window
+wredrawln/window
+wrefresh/screen
+wresize/window
+wscanw/screen
+wscrl/window
+wsetscrreg/window
+wstandend/window
+wstandout/window
+wsyncdown/screen (affects window plus parents)
+wsyncup/screen (affects window plus parents)
+wtimeout/window
+wtouchln/window
+wunctrl/global (static data)
+wvline/window
+wvline_set/window
+.TE
+.\" ***************************************************************************
 .SH RETURN VALUE
 These functions all return TRUE or FALSE, except as noted.
 .SH NOTES
index 835bb0bccae1e58b570dde770523352d5fecbfd5..84763c93fc27277803d39d67aa63611a2d44cb18 100644 (file)
 #include <curses.priv.h>
 #include <stddef.h>
 
-MODULE_ID("$Id: lib_newwin.c,v 1.45 2008/02/23 20:57:58 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.46 2008/04/05 19:16:42 tom Exp $")
+
+#define window_is(name) (sp->_##name == win)
+
+#if USE_REENTRANT
+#define remove_window(name) \
+               sp->_##name = 0
+#else
+#define remove_window(name) \
+               sp->_##name = 0; \
+               if (win == name) \
+                   name = 0
+#endif
 
 static WINDOW *
 remove_window_from_screen(WINDOW *win)
@@ -51,24 +63,12 @@ remove_window_from_screen(WINDOW *win)
 
     while (*scan) {
        SCREEN *sp = *scan;
-       if (sp->_curscr == win) {
-           sp->_curscr = 0;
-#if !USE_REENTRANT
-           if (win == curscr)
-               curscr = 0;
-#endif
-       } else if (sp->_stdscr == win) {
-           sp->_stdscr = 0;
-#if !USE_REENTRANT
-           if (win == stdscr)
-               stdscr = 0;
-#endif
-       } else if (sp->_newscr == win) {
-           sp->_newscr = 0;
-#if !USE_REENTRANT
-           if (win == newscr)
-               newscr = 0;
-#endif
+       if (window_is(curscr)) {
+           remove_window(curscr);
+       } else if (window_is(stdscr)) {
+           remove_window(stdscr);
+       } else if (window_is(newscr)) {
+           remove_window(newscr);
        } else {
            scan = &(*scan)->_next_screen;
            continue;
index 07808ba8728b00a0a508ba71196aac86dd577b58..e221812c3cd005caa624459d32fdf9e61864bd41 100644 (file)
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README,v 1.35 2007/08/18 23:12:24 tom Exp $
+-- $Id: README,v 1.36 2008/04/05 16:24:14 tom Exp $
 -------------------------------------------------------------------------------
 
 The programs in this directory are designed to test your newest toy :-)
@@ -223,14 +223,14 @@ TABSIZE                           lib: menu
 UP                             -
 acs_map                                test: gdc ins_wide inserts knight movewindow ncurses newdemo testcurs
 add_wch                                test: demo_panels ncurses
-add_wchnstr                    test: ncurses
+add_wchnstr                    -
 add_wchstr                     test: view
-addch                          test: blue bs ditto echochar hashtest ncurses savescreen testaddch view worm
+addch                          test: blue bs echochar hashtest ncurses savescreen testaddch view worm
 addchnstr                      -
 addchstr                       -
 addnstr                                -
-addnwstr                       -
-addstr                         test: blue bs cardfile gdc hanoi lrtest ncurses savescreen
+addnwstr                       test: ncurses
+addstr                         test: blue bs cardfile ditto gdc hanoi lrtest ncurses savescreen
 addwstr                                test: ncurses
 assume_default_colors          test: ncurses
 attr_get                       test: ncurses
@@ -274,7 +274,7 @@ del_curterm                 lib: ncurses
 delay_output                   test: newdemo
 delch                          -
 deleteln                       -
-delscreen                      test: dots_mvcur
+delscreen                      test: ditto dots_mvcur
 delwin                         test: cardfile chgat demo_forms demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
 derwin                         test: cardfile chgat demo_forms demo_menus inch_wide inchs ins_wide inserts movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
 doupdate                       test: cardfile demo_menus demo_panels edit_field ins_wide inserts knight movewindow ncurses redraw savescreen test_get_wstr test_getstr
@@ -297,7 +297,7 @@ getbegy                             test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw
 getbkgd                                test: ncurses
 getbkgrnd                      test: ncurses
 getcchar                       test: ncurses view
-getch                          test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain savescreen tclock testaddch testcurs view worm xmas
+getch                          test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest savescreen tclock testaddch testcurs view xmas
 getcurx                                test: bs chgat demo_altkeys demo_defkey demo_panels foldkeys movewindow ncurses redraw savescreen test_get_wstr test_getstr testcurs
 getcury                                test: bs chgat demo_altkeys demo_defkey demo_panels edit_field foldkeys movewindow ncurses redraw savescreen testcurs
 getmaxx                                test: chgat demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
@@ -345,12 +345,12 @@ is_cleared                        test: test_opaque
 is_idcok                       test: test_opaque
 is_idlok                       test: test_opaque
 is_immedok                     test: test_opaque
-is_keypad                      test: ncurses test_opaque
+is_keypad                      test: test_opaque
 is_leaveok                     test: test_opaque
 is_linetouched                 lib: form
 is_nodelay                     test: test_opaque
 is_notimeout                   test: test_opaque
-is_scrollok                    test: ncurses test_opaque
+is_scrollok                    test: test_opaque
 is_syncok                      test: test_opaque
 is_term_resized                        -
 is_wintouched                  lib: ncurses
@@ -370,7 +370,7 @@ meta                                test: ncurses
 mouse_trafo                    -
 mouseinterval                  -
 mousemask                      test: bs demo_forms demo_menus knight movewindow ncurses
-move                           test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses savescreen test_get_wstr test_getstr test_instr test_inwstr testscanw view worm xmas
+move                           test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses savescreen test_get_wstr test_getstr test_instr test_inwstr testscanw view xmas
 mvadd_wch                      test: ncurses
 mvadd_wchnstr                  -
 mvadd_wchstr                   -
@@ -454,14 +454,14 @@ mvwprintw                 test: chgat demo_panels inch_wide inchs ncurses test_instr test_inws
 mvwscanw                       test: testcurs
 mvwvline                       test: ins_wide inserts movewindow
 mvwvline_set                   -
-napms                          test: demo_panels dots dots_mvcur echochar firework gdc hanoi lrtest ncurses railroad rain tclock test_opaque testcurs view worm xmas progs: tset
+napms                          test: demo_panels ditto dots dots_mvcur echochar firework gdc hanoi lrtest ncurses railroad rain tclock test_opaque testcurs view worm xmas progs: tset
 newpad                         test: edit_field ncurses testcurs
 newscr                         lib: ncurses
 newterm                                test: demo_altkeys ditto dots_mvcur filter foldkeys gdc keynames
 newwin                         test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field firstlast inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
 nl                             test: demo_forms ncurses rain testcurs
 nocbreak                       test: testcurs
-nodelay                                test: firework gdc lrtest ncurses newdemo rain tclock test_opaque view xmas
+nodelay                                test: ditto firework gdc lrtest ncurses newdemo rain tclock test_opaque view worm xmas
 noecho                         test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
 nofilter                       -
 nonl                           test: bs demo_forms hashtest movewindow ncurses view worm xmas
@@ -485,7 +485,7 @@ putwin                              test: ncurses
 qiflush                                -
 raw                            test: demo_forms ncurses redraw testcurs
 redrawwin                      test: redraw
-refresh                                test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view worm xmas
+refresh                                test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view xmas
 reset_prog_mode                        test: filter ncurses
 reset_shell_mode               test: bs filter savescreen
 resetty                                -
@@ -503,7 +503,9 @@ scrl                                test: view
 scroll                         test: testcurs
 scrollok                       test: demo_altkeys demo_defkey demo_keyok demo_panels ditto foldkeys hashtest knight ncurses redraw test_opaque testcurs testscanw view
 set_curterm                    lib: ncurses
-set_term                       test: ditto
+set_escdelay                   -
+set_tabsize                    -
+set_term                       lib: ncurses
 setcchar                       test: demo_panels ins_wide ncurses view
 setscrreg                      test: view
 setupterm                      test: dots progs: clear tput tset
@@ -518,16 +520,16 @@ slk_clear                 test: ncurses
 slk_color                      test: ncurses
 slk_init                       test: ncurses
 slk_label                      test: ncurses
-slk_noutrefresh                        test: ncurses
+slk_noutrefresh                        -
 slk_refresh                    test: ncurses
 slk_restore                    test: ncurses
 slk_set                                test: ncurses
-slk_touch                      test: ncurses
+slk_touch                      lib: ncurses
 slk_wset                       test: ncurses
-standend                       test: blue gdc ncurses worm
+standend                       test: blue gdc ncurses
 standout                       test: blue ncurses
 start_color                    test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
-stdscr                         test: bs chgat demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view xmas
+stdscr                         test: bs chgat demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
 strcodes                       test: test_arrays progs: dump_entry
 strfnames                      test: test_arrays progs: dump_entry
 strnames                       test: foldkeys test_arrays progs: dump_entry infocmp tic
@@ -562,6 +564,8 @@ use_default_colors          test: filter firework gdc hanoi knight ncurses rain tclock w
 use_env                                progs: tput
 use_extended_names             progs: infocmp tic
 use_legacy_coding              -
+use_screen                     test: ditto
+use_window                     test: rain worm
 vid_attr                       -
 vid_puts                       -
 vidattr                                lib: ncurses
@@ -575,7 +579,7 @@ vwscanw                             lib: ncurses
 wadd_wch                       test: inch_wide
 wadd_wchnstr                   lib: form
 wadd_wchstr                    -
-waddch                         test: demo_forms demo_panels firstlast inch_wide inchs knight ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
+waddch                         test: demo_forms demo_panels firstlast inch_wide inchs knight ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque worm
 waddchnstr                     lib: ncurses
 waddchstr                      -
 waddnstr                       lib: menu
@@ -610,7 +614,7 @@ werase                              test: cardfile demo_forms demo_menus demo_panels edit_field firstlast
 wget_wch                       test: ins_wide ncurses
 wget_wstr                      test: test_get_wstr
 wgetbkgrnd                     lib: ncurses
-wgetch                         test: cardfile chgat demo_defkey demo_keyok demo_menus demo_panels edit_field gdc inserts knight movewindow ncurses newdemo redraw test_opaque testcurs
+wgetch                         test: cardfile chgat demo_defkey demo_keyok demo_menus demo_panels edit_field gdc inserts knight movewindow ncurses newdemo rain redraw test_opaque testcurs worm
 wgetn_wstr                     test: ncurses test_get_wstr
 wgetnstr                       test: ncurses test_getstr
 wgetparent                     test: test_opaque
@@ -637,11 +641,11 @@ winsstr                           test: inserts
 winstr                         test: test_instr
 winwstr                                test: test_inwstr
 wmouse_trafo                   lib: form
-wmove                          test: chgat demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
+wmove                          test: chgat demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs worm
 wnoutrefresh                   test: demo_menus edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque
 wprintw                                test: chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
 wredrawln                      test: redraw
-wrefresh                       test: chgat demo_forms demo_keyok demo_menus demo_panels edit_field firstlast knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view xmas
+wrefresh                       test: chgat demo_forms demo_keyok demo_menus demo_panels edit_field firstlast knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view worm xmas
 wresize                                test: cardfile ncurses
 wscanw                         test: testcurs
 wscrl                          test: ncurses testcurs
index bb7a6b0afc05c9f9d7e264682c44dfe756da920f..3e5fafa8d9f2592bab2d1f3f1848c0a39103d050 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_opaque.c,v 1.5 2008/01/19 21:01:36 tom Exp $
+ * $Id: test_opaque.c,v 1.6 2008/04/05 18:03:57 tom Exp $
  *
  * Author: Thomas E Dickey
  *
@@ -51,7 +51,7 @@
 #define BASE_Y 6
 #define MAX_COLS 1024
 
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20070818) && NCURSES_EXT_FUNCS
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20080119) && NCURSES_EXT_FUNCS
 
 static bool
 Quit(int ch)
@@ -394,6 +394,46 @@ test_opaque(int level, char **argv, WINDOW *stswin)
     return TRUE;
 }
 
+static void
+test_set_escdelay(void)
+{
+    set_escdelay((100 + ESCDELAY) / 2);
+}
+
+static void
+test_set_tabsize(void)
+{
+    int y0, x0;
+    int y, x;
+    int save_tabsize = TABSIZE;
+    bool done = FALSE;
+
+    (void) cbreak();           /* take input chars one at a time, no wait for \n */
+    (void) noecho();           /* don't echo input */
+
+    for (y = 0; y < LINES; ++y) {
+       set_tabsize(y + 1);
+       if (move(y, 0) == ERR)
+           break;
+       for (x = 0; x < COLS;) {
+           addch('\t');
+           if (addch('*') == ERR) {
+               done = TRUE;
+               break;
+           }
+           getyx(stdscr, y0, x0);
+           if (y0 != y || x0 == x) {
+               done = TRUE;
+               break;
+           }
+       }
+    }
+    getch();
+    erase();
+
+    set_tabsize(save_tabsize);
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -409,6 +449,9 @@ main(int argc, char *argv[])
 
     initscr();
 
+    test_set_escdelay();
+    test_set_tabsize();
+
     stsbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
     box(stsbox, 0, 0);
     wnoutrefresh(stsbox);