./test/test_addstr.c
./test/test_addwstr.c
./test/test_arrays.c
+./test/test_delwin.c
./test/test_get_wstr.c
./test/test_getstr.c
./test/test_instr.c
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3841 2022/08/06 19:13:14 tom Exp $
+-- $Id: NEWS,v 1.3846 2022/08/13 23:42:30 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20220813
+ + modify delscreen to more effectively delete all windows on the given
+ screen.
+ + amend portability note for delwin in manual page.
+ + adapt test/test_delwin.c from example by Bill Gray.
+ + account for prescreen data if freeing leaks in pthread-configuration
+ + split-out _nc_set_read_thread(), to reduce compiler warnings about
+ pthread_self(), which may/may not be a weak symbol.
+ + improve pthread-configuration for test/worm.c
+
20220806
+ amend end_of_stream() to allow for input files without a final
newline.
-5:0:10 6.3 20220806
+5:0:10 6.3 20220813
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1496 2022/08/06 10:14:36 tom Exp $
+# $Id: dist.mk,v 1.1497 2022/08/13 09:43:55 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 3
-NCURSES_PATCH = 20220806
+NCURSES_PATCH = 20220813
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>xterm(1)</STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_window.3x,v 1.27 2022/07/24 15:35:15 tom Exp @
+ * @Id: curs_window.3x,v 1.28 2022/08/13 23:24:22 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
ent window which still has subwindows.
<STRONG>o</STRONG> Since release 4.0 (1996), ncurses maintains a list of windows for
- each screen, and is able to recursively delete subwindows when
- asked to delete their parent.
+ each screen, to ensure that a window has no subwindows before al-
+ lowing deletion.
<STRONG>o</STRONG> NetBSD copied this feature of ncurses in 2003.
PDCurses follows the scheme used in Solaris X/Open curses.
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "form_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
https://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
method of updating character screens with reasonable optimization.
This implementation is "new curses" (ncurses) and is the approved
replacement for 4.4BSD classic curses, which has been discontinued.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
The <STRONG>ncurses</STRONG> library emulates the curses library of System V Release 4
UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This manual describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
<STRONG>csh(1)</STRONG>, <STRONG>sh(1)</STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>tty(4)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
<STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
+ This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220813).
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_window.3x,v 1.27 2022/07/24 15:35:15 tom Exp $
+.\" $Id: curs_window.3x,v 1.28 2022/08/13 23:24:22 tom Exp $
.TH curs_window 3X ""
.de bP
.ie n .IP \(bu 4
and will delete a parent window which still has subwindows.
.bP
Since release 4.0 (1996), ncurses maintains a list of windows for each screen,
-and is able to recursively delete subwindows when asked to delete their parent.
+to ensure that a window has no subwindows before allowing deletion.
.bP
NetBSD copied this feature of ncurses in 2003.
.br
/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2021,2022 Thomas E. Dickey *
* Copyright 1998-2015,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#define NEED_KEY_EVENT
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.143 2021/10/23 17:06:20 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.144 2022/08/13 14:36:43 tom Exp $")
#include <fifo_defs.h>
int buf;
# if defined(EXP_WIN32_DRIVER)
if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && sp->_cbreak) {
-# if USE_PTHREADS_EINTR
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
n = _nc_console_read(sp,
_nc_console_handle(sp->_ifd),
&buf);
-# if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-# endif
+ _nc_set_read_thread(FALSE);
} else
# elif defined(_NC_WINDOWS)
if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && sp->_cbreak)
int buf;
#endif
unsigned char c2 = 0;
-#if USE_PTHREADS_EINTR
-#if USE_WEAK_SYMBOLS
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
-#endif
- _nc_globals.read_thread = pthread_self();
-#endif
+
+ _nc_set_read_thread(TRUE);
#if defined(EXP_WIN32_DRIVER)
n = _nc_console_read(sp,
_nc_console_handle(sp->_ifd),
#else
n = (int) read(sp->_ifd, &c2, (size_t) 1);
#endif
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
ch = c2;
#endif /* USE_TERM_DRIVER */
}
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.196 2022/04/30 23:21:34 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.197 2022/08/13 14:13:12 tom Exp $")
#include <tic.h>
int res;
bool result;
-# if USE_PTHREADS_EINTR
-# if USE_WEAK_SYMBOLS
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
-# endif
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
for (grabbed = 0; grabbed < MAX_KBUF; grabbed += (size_t) res) {
/* For VIO mouse we add extra bit 64 to disambiguate button-up. */
if (res == -1)
break;
}
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
kbuf[MAX_KBUF] = '\0';
TR(TRACE_IEVENT,
coords[0] = 0;
coords[1] = 0;
-# if USE_PTHREADS_EINTR
-# if USE_WEAK_SYMBOLS
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
-# endif
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
for (grabbed = 0; grabbed < limit;) {
int res;
break;
}
}
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
TR(TRACE_IEVENT,
("_nc_mouse_inline sees the following xterm data: %s",
int marker = 1;
memset(result, 0, sizeof(*result));
-# if USE_PTHREADS_EINTR
-# if USE_WEAK_SYMBOLS
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
-# endif
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
do {
int res;
}
++grabbed;
} while (!isFinal(ch));
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
kbuf[++grabbed] = 0;
TR(TRACE_IEVENT,
#undef CUR
#define CUR SP_TERMTYPE
-MODULE_ID("$Id: lib_set_term.c,v 1.181 2022/07/21 23:35:21 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.182 2022/08/13 23:14:26 tom Exp $")
#ifdef USE_TERM_DRIVER
#define MaxColors InfoOf(sp).maxcolors
_nc_lock_global(curses);
if (delink_screen(sp)) {
+ WINDOWLIST *wl;
bool is_current = (sp == CURRENT_SCREEN);
#ifdef USE_SP_RIPOFF
}
#endif
- (void) _nc_freewin(CurScreen(sp));
- (void) _nc_freewin(NewScreen(sp));
- (void) _nc_freewin(StdScreen(sp));
+ /* delete all of the windows in this screen */
+ rescan:
+ for (each_window(sp, wl)) {
+ if (_nc_freewin(&(wl->win)) == OK) {
+ goto rescan;
+ }
+ }
if (sp->_slk != 0) {
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.650 2022/05/01 14:41:33 tom Exp $
+ * $Id: curses.priv.h,v 1.651 2022/08/13 14:35:01 tom Exp $
*
* curses.priv.h
*
#define _nc_lock_global(name) /* nothing */
#define _nc_try_global(name) 0
#define _nc_unlock_global(name) /* nothing */
-
#endif /* USE_PTHREADS */
+#if USE_PTHREADS_EINTR || defined(EXP_WIN32_DRIVER)
+extern NCURSES_EXPORT(void) _nc_set_read_thread(bool);
+#else
+#define _nc_set_read_thread(enable) /* nothing */
+#endif
+
/*
* When using sp-funcs, locks are targeted to SCREEN-level granularity.
* So the locking is done in the non-sp-func (which calls the sp-func) rather
#include <tic.h>
-MODULE_ID("$Id: entries.c,v 1.33 2022/05/07 17:08:11 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.34 2022/08/13 16:57:35 tom Exp $")
/****************************************************************************
*
_nc_free_tparm(cur_term);
_nc_tgetent_leaks();
+#ifdef USE_PTHREADS
+ /*
+ * Discard any prescreen data which is not used for the current screen.
+ */
+ _nc_lock_global(screen);
+ {
+ PRESCREEN_LIST *p;
+ pthread_t id = GetThreadID();
+ for (p = _nc_prescreen.allocated; p != 0; p = p->next) {
+ if (p->id == id && p->sp != CURRENT_SCREEN) {
+ FreeAndNull(p->sp);
+ }
+ }
+ }
+ _nc_unlock_global(screen);
+#endif
if (TerminalOf(CURRENT_SCREEN) != 0) {
del_curterm(TerminalOf(CURRENT_SCREEN));
}
#include <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.217 2022/07/21 08:24:50 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.218 2022/08/13 18:12:22 tom Exp $")
/****************************************************************************
*
if (NC_ISATTY(Filedes)) {
NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
- NCURSES_SP_NAME(baudrate)(NCURSES_SP_ARG);
+ NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);
}
code = OK;
#endif
{
PRESCREEN_LIST *p, *q;
pthread_t id = GetThreadID();
+ _nc_lock_global(screen);
for (p = _nc_prescreen.allocated, q = 0; p != 0; q = p, p = p->next) {
if (p->id == id) {
if (q) {
break;
}
}
+ _nc_unlock_global(screen);
}
#endif /* USE_PTHREADS */
/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2021,2022 Thomas E. Dickey *
* Copyright 2008-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.72 2021/06/17 21:30:22 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.73 2022/08/13 14:36:43 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
assert(buf);
SetSP();
-# if USE_PTHREADS_EINTR
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
#ifdef EXP_WIN32_DRIVER
n = _nc_console_read(sp,
_nc_console_handle(sp->_ifd),
#else
n = (int) read(sp->_ifd, &c2, (size_t) 1);
#endif
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
#ifndef EXP_WIN32_DRIVER
*buf = (int) c2;
#endif
/****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 2020-2021,2022 Thomas E. Dickey *
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <SigAction.h>
-MODULE_ID("$Id: lib_tstp.c,v 1.51 2021/09/04 10:54:35 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.52 2022/08/13 14:36:43 tom Exp $")
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
#define USE_SIGTSTP 1
}
#if USE_SIGWINCH
+
+# ifndef _nc_set_read_thread
+NCURSES_EXPORT(void)
+_nc_set_read_thread(bool enable)
+{
+ if (enable) {
+# if USE_WEAK_SYMBOLS
+ if ((pthread_self) && (pthread_kill) && (pthread_equal))
+# endif
+ _nc_globals.read_thread = pthread_self();
+ } else {
+ _nc_globals.read_thread = 0;
+ }
+}
+# endif
+
static void
handle_SIGWINCH(int sig GCC_UNUSED)
{
-ncurses6 (6.3+20220806) unstable; urgency=low
+ncurses6 (6.3+20220813) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 06 Aug 2022 06:14:36 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 13 Aug 2022 05:43:55 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.3+20220806) unstable; urgency=low
+ncurses6 (6.3+20220813) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 06 Aug 2022 06:14:36 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 13 Aug 2022 05:43:55 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.3+20220806) unstable; urgency=low
+ncurses6 (6.3+20220813) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 06 Aug 2022 06:14:36 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 13 Aug 2022 05:43:55 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.536 2022/08/06 10:14:36 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.537 2022/08/13 09:43:55 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "3"\r
!define VERSION_YYYY "2022"\r
-!define VERSION_MMDD "0806"\r
+!define VERSION_MMDD "0813"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.3
-Release: 20220806
+Release: 20220813
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.3
-Release: 20220806
+Release: 20220813
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.3
-Release: 20220806
+Release: 20220813
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README,v 1.76 2022/06/04 23:25:37 tom Exp $
+-- $Id: README,v 1.77 2022/08/13 23:34:33 tom Exp $
-------------------------------------------------------------------------------
The programs in this directory are used to test and demonstrate ncurses.
COLORS test: color_content demo_new_pair dots_curses dots_xcurses echochar ncurses pair_content picsmap savescreen xmas
COLOR_PAIR test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels dots_curses dup_field echochar filter firework gdc hanoi ins_wide insdelln inserts knight move_field ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
COLOR_PAIRS test: demo_new_pair dots_curses dots_xcurses echochar ncurses newdemo pair_content
-COLS test: cardfile combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
+COLS test: cardfile combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
ESCDELAY test: test_opaque
-LINES test: cardfile combine demo_defkey demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest move_field movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
+LINES test: cardfile combine demo_defkey demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest move_field movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
PAIR_NUMBER test: dump_window ncurses
PC test: demo_termcap
SP lib: form
boolnames test: demo_terminfo test_arrays progs: dump_entry infocmp
border -
border_set -
-box test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
+box test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
box_set test: ncurses
can_change_color test: color_content extended_color ncurses
can_change_color_sp test: extended_color
-cbreak test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas
+cbreak test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas
cbreak_sp test: sp_tinfo
chgat test: chgat
clear test: blue bs filter gdc ncurses padview testcurs xmas
delay_output_sp test: sp_tinfo
delch -
deleteln test: insdelln
-delscreen test: ditto dots_mvcur
-delwin test: cardfile chgat clip_printw demo_forms demo_panels dup_field inch_wide inchs ins_wide insdelln inserts move_field ncurses newdemo padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view
-derwin test: cardfile chgat clip_printw demo_forms demo_menus ditto inch_wide inchs ins_wide insdelln inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque
+delscreen test: ditto dots_mvcur test_delwin
+delwin test: cardfile chgat clip_printw demo_forms demo_panels dup_field inch_wide inchs ins_wide insdelln inserts move_field ncurses newdemo padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view
+derwin test: cardfile chgat clip_printw demo_forms demo_menus ditto inch_wide inchs ins_wide insdelln inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque
doupdate test: cardfile demo_menus demo_panels ditto ins_wide inserts knight movewindow ncurses padview popup_msg redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr
doupdate_sp lib: ncurses
dupwin test: popup_msg
echo_sp lib: ncurses
echo_wchar test: ncurses
echochar test: echochar ncurses
-endwin test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_mvcur dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testaddch testcurs testscanw view worm xmas
+endwin test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_mvcur dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testaddch testcurs testscanw view worm xmas
endwin_sp lib: ncurses
erase test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses picsmap tclock test_opaque testcurs
erasechar test: ncurses
erasechar_sp test: sp_tinfo
erasewchar test: ncurses
erasewchar_sp lib: ncurses
-exit_curses test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_setupterm test_termattrs test_unget_wch testaddch testcurs testscanw view worm xmas
+exit_curses test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_setupterm test_termattrs test_unget_wch testaddch testcurs testscanw view worm xmas
exit_terminfo test: demo_termcap demo_terminfo dots dots_mvcur dots_termcap list_keys railroad sp_tinfo test_arrays test_sgr test_tparm test_vid_puts test_vidputs
extended_color_content test: color_content extended_color
extended_color_content_sp test: extended_color
mvwinsstr test: inserts testcurs
mvwinstr test: test_instr
mvwinwstr test: test_inwstr
-mvwprintw test: demo_menus demo_panels inch_wide inchs ncurses test_instr test_inwstr testcurs
+mvwprintw test: demo_menus demo_panels inch_wide inchs ncurses test_delwin test_instr test_inwstr testcurs
mvwscanw test: testcurs
mvwvline test: ins_wide inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr
mvwvline_set -
newpad test: ncurses padview popup_msg testcurs
newpad_sp lib: ncurses
newscr lib: ncurses
-newterm test: demo_altkeys demo_new_pair ditto dots_mvcur extended_color filter foldkeys gdc key_names keynames redraw test_setupterm test_termattrs
+newterm test: demo_altkeys demo_new_pair ditto dots_mvcur extended_color filter foldkeys gdc key_names keynames redraw test_delwin test_setupterm test_termattrs
newterm_sp -
-newwin test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
+newwin test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
newwin_sp lib: ncurses
nl test: demo_forms dup_field move_field ncurses rain testcurs
nl_sp lib: ncurses
nocbreak test: testcurs
nocbreak_sp test: sp_tinfo
nodelay test: demo_new_pair ditto extended_color firework gdc lrtest ncurses newdemo padview rain tclock test_opaque view worm xmas
-noecho test: back_ground background bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas
+noecho test: back_ground background bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas
noecho_sp lib: ncurses
nofilter -
nofilter_sp -
pechochar -
pnoutrefresh test: ncurses padview popup_msg
prefresh test: testcurs
-printw test: back_ground background blue bs color_content color_set combine demo_altkeys demo_defkey demo_keyok demo_tabs extended_color filter foldkeys ncurses pair_content savescreen test_unget_wch testcurs testscanw view
+printw test: back_ground background blue bs color_content color_set combine demo_altkeys demo_defkey demo_keyok demo_tabs extended_color filter foldkeys ncurses pair_content savescreen test_delwin test_unget_wch testcurs testscanw view
putp test: filter test_mouse test_sgr progs: tput
putp_sp test: sp_tinfo
putwin test: ncurses
raw test: demo_forms dup_field move_field ncurses redraw testcurs
raw_sp test: sp_tinfo
redrawwin test: combine padview redraw view
-refresh test: blue bs color_content demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_mvcur dots_xcurses dup_field echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest move_field movewindow ncurses pair_content picsmap savescreen tclock test_mouse testcurs view xmas
+refresh test: blue bs color_content demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_mvcur dots_xcurses dup_field echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest move_field movewindow ncurses pair_content picsmap savescreen tclock test_delwin test_mouse testcurs view xmas
reset_color_pairs test: picsmap
reset_color_pairs_sp -
reset_prog_mode test: filter ncurses
scr_set_sp -
scrl test: view
scroll test: testcurs
-scrollok test: clip_printw color_content demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses pair_content picsmap redraw test_opaque test_unget_wch testcurs testscanw view
+scrollok test: clip_printw color_content demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses pair_content picsmap redraw test_delwin test_opaque test_unget_wch testcurs testscanw view
set_curterm test: list_keys sp_tinfo
set_curterm_sp test: sp_tinfo
set_escdelay test: test_opaque
standout test: blue ncurses
start_color test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses dup_field echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight move_field ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
start_color_sp -
-stdscr test: back_ground background bs chgat clip_printw color_content combine demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto dup_field edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs testscanw view worm xmas
+stdscr test: back_ground background bs chgat clip_printw color_content combine demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto dup_field edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs testscanw view worm xmas
strcodes test: demo_termcap test_arrays progs: dump_entry
strfnames test: demo_terminfo list_keys test_arrays progs: dump_entry
strnames test: demo_terminfo foldkeys list_keys test_arrays test_tparm progs: dump_entry infocmp tic
timeout test: filter rain savescreen
tiparm -
touchline test: chgat clip_printw insdelln
-touchwin test: chgat clip_printw demo_menus filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
+touchwin test: chgat clip_printw demo_menus filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
tparm test: dots dots_mvcur test_mouse test_sgr test_tparm progs: tic tput
tputs test: dots dots_mvcur dots_termcap railroad test_tparm test_vid_puts test_vidputs progs: clear_cmd reset_cmd tabs
tputs_sp test: sp_tinfo
wborder_set test: ncurses
wchgat test: chgat test_get_wstr test_getstr view
wclear test: ncurses test_opaque testcurs
-wclrtobot test: firstlast inch_wide inchs ncurses test_instr test_inwstr testcurs
+wclrtobot test: firstlast inch_wide inchs ncurses test_delwin test_instr test_inwstr testcurs
wclrtoeol test: chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels firstlast inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_instr test_inwstr testcurs
wcolor_set lib: ncurses
wcursyncup lib: form
wget_wch test: ins_wide ncurses test_add_wchstr test_addwstr
wget_wstr test: test_get_wstr
wgetbkgrnd lib: ncurses
-wgetch test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto dump_window dup_field edit_field gdc insdelln inserts knight move_field movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_opaque testcurs worm
+wgetch test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto dump_window dup_field edit_field gdc insdelln inserts knight move_field movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_delwin test_opaque testcurs worm
wgetdelay test: test_opaque
wgetn_wstr test: ncurses test_get_wstr
wgetnstr test: ncurses test_getstr
wnoutrefresh test: demo_menus ditto inch_wide inchs ins_wide inserts knight movewindow ncurses padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque
wprintw test: chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque testcurs
wredrawln test: redraw
-wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels dup_field firstlast ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs worm xmas
+wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels dup_field firstlast ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin testcurs worm xmas
wresize test: cardfile demo_menus ncurses
wscanw test: testcurs
wscrl test: ncurses testcurs
-wsetscrreg test: ncurses testcurs
+wsetscrreg test: ncurses test_delwin testcurs
wstandend test: ncurses test_opaque xmas
wstandout test: ncurses test_opaque xmas
wsyncdown test: movewindow
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_tabs.c,v 1.6 2022/05/15 13:04:57 tom Exp $
+ * $Id: demo_tabs.c,v 1.7 2022/08/13 21:02:25 tom Exp $
*
* A simple demo of tabs in curses.
*/
#define USE_CURSES
#define USE_TINFO
-#include "test.priv.h"
+#include <test.priv.h>
static void
usage(void)
-# $Id: modules,v 1.77 2022/05/07 22:39:21 tom Exp $
+# $Id: modules,v 1.78 2022/08/13 20:53:43 tom Exp $
##############################################################################
# Copyright 2018-2021,2022 Thomas E. Dickey #
# Copyright 1998-2016,2017 Free Software Foundation, Inc. #
test_addstr progs $(srcdir) $(HEADER_DEPS) $(srcdir)/linedata.h
test_addwstr progs $(srcdir) $(HEADER_DEPS) $(srcdir)/linedata.h
test_arrays progs $(srcdir) $(HEADER_DEPS)
+test_delwin progs $(srcdir) $(HEADER_DEPS)
test_get_wstr progs $(srcdir) $(HEADER_DEPS)
test_getstr progs $(srcdir) $(HEADER_DEPS)
test_instr progs $(srcdir) $(HEADER_DEPS)
-# $Id: programs,v 1.53 2022/05/07 22:39:49 tom Exp $
+# $Id: programs,v 1.55 2022/08/13 23:37:10 tom Exp $
##############################################################################
# Copyright 2018-2021,2022 Thomas E. Dickey #
# Copyright 2006-2016,2017 Free Software Foundation, Inc. #
test_addstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_addstr
test_addwstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_addwstr
test_arrays $(LDFLAGS_TINFO) $(LOCAL_LIBS) test_arrays
+test_delwin $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_delwin
test_get_wstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_get_wstr popup_msg
test_getstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_getstr popup_msg
test_instr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_instr
--- /dev/null
+/****************************************************************************
+ * Copyright 2022 Thomas E. Dickey *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+ * $Id: test_delwin.c,v 1.3 2022/08/14 00:12:52 tom Exp $
+ */
+#include <test.priv.h>
+
+#define STATUS 10
+
+static SCREEN *my_screen;
+
+static void
+show_rc(const char *what, const char *explain, int rc)
+{
+ printw("%s : %d (%s)\n", what, rc, explain);
+}
+
+static void
+next_step(WINDOW *win)
+{
+ int ch = wgetch(win);
+ if (ch == QUIT || ch == ESCAPE) {
+ endwin();
+ /* use this to verify if delscreen frees all memory */
+ delscreen(my_screen);
+ exit(EXIT_FAILURE);
+ }
+}
+
+int
+main(void)
+{
+ WINDOW *parent, *child1;
+ int rc;
+
+ if ((my_screen = newterm(NULL, stdout, stdin)) == NULL)
+ ExitProgram(EXIT_FAILURE);
+
+ noecho();
+ cbreak();
+
+ refresh();
+ wsetscrreg(stdscr, 0, STATUS - 1);
+ scrollok(stdscr, TRUE);
+
+ parent = newwin(0, 0, STATUS, 0);
+ box(parent, 0, 0);
+ wrefresh(parent);
+ next_step(parent);
+
+ printw("New window %p %s\n", (void *) parent, "Top window");
+ mvwprintw(parent, 1, 1, "Top window");
+ wrefresh(parent);
+ next_step(stdscr);
+
+ child1 = derwin(parent, LINES - STATUS - 4, COLS - 4, 2, 2);
+ box(child1, 0, 0);
+ mvwprintw(child1, 1, 1, "Sub window");
+ wrefresh(child1);
+
+ printw("Sub window %p %s\n", (void *) child1, "Hello world!");
+ next_step(stdscr);
+
+ show_rc("Deleted parent",
+ "should fail, it still has a subwindow",
+ rc = delwin(parent));
+ next_step(stdscr);
+ show_rc("Deleted child1",
+ "should succeed",
+ rc = delwin(child1));
+ next_step(stdscr);
+ if (rc == OK) {
+ wclrtobot(parent);
+ box(parent, 0, 0);
+ next_step(parent);
+ }
+ show_rc("Deleted parent",
+ "should succeed, it has no subwindow now",
+ rc = delwin(parent));
+ next_step(stdscr);
+ if (rc == OK) {
+ touchwin(stdscr);
+ next_step(stdscr);
+ }
+ show_rc("Deleted parent",
+ "should fail, may dump core",
+ delwin(parent));
+ next_step(stdscr);
+ endwin();
+ ExitProgram(EXIT_SUCCESS);
+}
traces will be dumped. The program stops and waits for one character of
input at the beginning and end of the interval.
- $Id: worm.c,v 1.84 2022/07/23 17:06:16 tom Exp $
+ $Id: worm.c,v 1.85 2022/08/13 13:28:01 tom Exp $
*/
#include <test.priv.h>
Trace(("Cleanup"));
cleanup();
+#ifdef USE_PTHREADS
+ /*
+ * Do this just in case one of the threads did not really exit.
+ */
+ Trace(("join all threads"));
+ for (n = 0; n < number; n++) {
+ pthread_join(worm[n].thread, NULL);
+ }
+#endif
#if NO_LEAKS
for (y = 0; y < max_refs; y++) {
free(refs[y]);
free(w->xpos);
free(w->ypos);
}
-#endif
-#ifdef USE_PTHREADS
- /*
- * Do this just in case one of the threads did not really exit.
- */
- Trace(("join all threads"));
- for (n = 0; n < number; n++) {
- pthread_join(worm[n].thread, NULL);
- }
#endif
ExitProgram(EXIT_SUCCESS);
}