./test/package/debian/watch
./test/package/mingw-ncurses-examples.spec
./test/package/ncurses-examples.spec
+./test/padview.c
./test/picsmap.c
./test/popup_msg.c
./test/popup_msg.h
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2979 2017/10/21 20:29:16 tom Exp $
+-- $Id: NEWS,v 1.2991 2017/10/28 23:46: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.
+20171028
+ + improve man/curs_inwstr.3x, correct end-logic for lib_inwstr.c
+ (report by Midolikawa H).
+ + fix typo in a few places for "improvements" (patch by Sven Joachim).
+ + clear the other half of a double-width character on which a line
+ drawing character is drawn.
+ + make test/ncurses.c "s" test easier to understand which subtests are
+ available; add a "S" wide-character overlap test-screen.
+ + modify test/ncurses.c C/c tests to allow for extended color pairs.
+ + add endwin() call in error-returns from test/ncurses.c omitted in
+ recent redesign of its menu (cf: 20170923).
+ + improve install of hashed-db by removing the ".db" file as done for
+ directory-tree terminal databases.
+ + repair a few overlooked items in include/ncurses_defs from recent
+ port/refactoring of test-programs (cf: 20170909).
+ + add test/padview.c, to compare pads with direct updates in view.c
+
20171021
+ modify test/view.c to expand tabs using the ncurses library rather
than in the test-program.
+ regenerated html manpages.
20120107
- + various improvments for MinGW (Juergen Pfeifer):
+ + various improvements for MinGW (Juergen Pfeifer):
+ modify stat() calls to ignore the st_size member
+ drop mk-dlls.sh script.
+ change recommended regular expression library.
+ fix ifdef in c++/internal.h for QNX 6.1
+ test-compiled with (old) egcs-1.1.2, modified configure script to
not unset the $CXX and related variables which would prevent this.
- + fix a few terminfo.src typos exposed by improvments to "-f" option.
+ + fix a few terminfo.src typos exposed by improvements to "-f" option.
+ improve infocmp/tic "-f" option formatting.
20060923
-5:0:9 6.0 20171021
+5:0:9 6.0 20171028
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1188 2017/10/15 14:51:52 tom Exp $
+# $Id: dist.mk,v 1.1189 2017/10/22 10:49:45 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 = 0
-NCURSES_PATCH = 20171021
+NCURSES_PATCH = 20171028
# 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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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>
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_inch.3x,v 1.18 2017/10/14 19:14:47 tom Exp @
+ * @Id: curs_inch.3x,v 1.19 2017/10/28 20:16:52 Sven.Joachim Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<STRONG>o</STRONG> System V curses added support for several video attributes which
could be combined with characters in the window.
- Reflecting this improvment, the function was altered to return the
+ Reflecting this improvement, the function was altered to return the
character combined with all video attributes in a <STRONG>chtype</STRONG> value.
X/Open Curses does not specify the size and layout of attributes, color
<!--
****************************************************************************
- * Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2012,2017 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 *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_inwstr.3x,v 1.8 2012/11/03 23:03:59 tom Exp @
+ * @Id: curs_inwstr.3x,v 1.9 2017/10/28 23:42:58 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
<STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
- <STRONG>int</STRONG> <STRONG>inwstr(wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>innwstr(wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>winwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>winnwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>mvinwstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>mvinnwstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>mvwinwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>);</STRONG>
- <STRONG>int</STRONG> <STRONG>mvwinnwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>inwstr(wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>innwstr(wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>winwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>winnwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>mvinwstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>mvinnwstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>mvwinwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>);</STRONG>
+ <STRONG>int</STRONG> <STRONG>mvwinnwstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>wstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- These routines return a string of <STRONG>wchar_t</STRONG> characters in <EM>wstr</EM>, extracted
- starting at the current cursor position in the named window.
- Attributes are stripped from the characters. The four functions with <EM>n</EM>
- as the last argument return a leading substring at most <EM>n</EM> bytes long
- (exclusive of the trailing NUL). Transfer stops at the end of the cur-
- rent line, or when <EM>n</EM> bytes have been stored at the location referenced
- by <EM>wstr</EM>.
+ These routines return a string of <STRONG>wchar_t</STRONG> wide characters in <EM>wstr</EM>,
+ extracted starting at the current cursor position in the named window.
- If the size <EM>n</EM> is not large enough to store a complete character, an
- error is generated.
+ The four functions with <EM>n</EM> as the last argument return a leading sub-
+ string at most <EM>n</EM> characters long (exclusive of the trailing NUL).
+ Transfer stops at the end of the current line, or when <EM>n</EM> characters
+ have been stored at the location referenced by <EM>wstr</EM>.
+
+ If the size <EM>n</EM> is not large enough to store a complete complex charac-
+ ter, an error is generated.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Note that all routines except <STRONG>winnwstr</STRONG> may be macros.
+ All routines except <STRONG>winnwstr</STRONG> may be macros.
+
+ Each cell in the window holds a complex character (i.e., base- and com-
+ bining-characters) together with attributes and color. These functions
+ store only the wide characters, ignoring attributes and color. Use
+ <STRONG>in_wchstr</STRONG> to return the complex characters from a window.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- All routines return <STRONG>ERR</STRONG> upon failure. Upon successful completion, the
+ All routines return <STRONG>ERR</STRONG> upon failure. Upon successful completion, the
*<STRONG>inwstr</STRONG> routines return <STRONG>OK</STRONG>, and the *<STRONG>innwstr</STRONG> routines return the number
of characters read into the string.
- Functions with a "mv" prefix first perform a cursor movement using
+ Functions with a "mv" prefix first perform a cursor movement using
<STRONG>wmove</STRONG>, and return an error if the position is outside the window, or if
the window pointer is null.
<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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
http://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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="tset.1.html">tset(1)</A></STRONG>, <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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
<EM>Terminfo</EM> describes terminals by giving a set of capabilities which they
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences. This describes
- <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(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>.
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG>ter-</STRONG>
<STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
</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="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
<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.0 (patch 20171014).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171028).
-# $Id: ncurses_defs,v 1.81 2017/09/29 23:56:38 tom Exp $
+# $Id: ncurses_defs,v 1.83 2017/10/22 23:53:00 tom Exp $
##############################################################################
# Copyright (c) 2000-2016,2017 Free Software Foundation, Inc. #
# #
HAVE_COPYWIN 1
HAVE_CURSCR 1
HAVE_CURSES_DATA_TTYTYPE 1
+HAVE_DELSCREEN 1
HAVE_DERWIN 1
HAVE_DIRENT_H
HAVE_DUPWIN 1
HAVE_MBTOWC
HAVE_MENU_H
HAVE_MKSTEMP
+HAVE_MVDERWIN 1
HAVE_MVVLINE 1
+HAVE_MVWIN 1
HAVE_MVWVLINE 1
HAVE_NANOSLEEP
HAVE_NC_ALLOC_H
HAVE_REMOVE
HAVE_RESIZETERM
HAVE_RESIZE_TERM
+HAVE_RESTARTTERM 1
HAVE_RIPOFFLINE 1
HAVE_SCR_DUMP 1
HAVE_SELECT
HAVE_VID_PUTS 1
HAVE_VSNPRINTF
HAVE_VSSCANF
+HAVE_VW_PRINTW 1
+HAVE_WCHGAT 1
HAVE_WCSRTOMBS
HAVE_WCSTOMBS
HAVE_WCTOB
HAVE_WCTOMB
HAVE_WCTYPE_H
+HAVE_WINSDELLN 1
HAVE_WINSSTR 1
HAVE_WORKING_POLL
HAVE_WRESIZE
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inch.3x,v 1.18 2017/10/14 19:14:47 tom Exp $
+.\" $Id: curs_inch.3x,v 1.19 2017/10/28 20:16:52 Sven.Joachim Exp $
.TH curs_inch 3X ""
.de bP
.IP \(bu 4
System V curses added support for several video attributes which
could be combined with characters in the window.
.IP
-Reflecting this improvment, the function was altered to return the
+Reflecting this improvement, the function was altered to return the
character combined with all video attributes in a \fBchtype\fP value.
.PP
X/Open Curses does not specify
.\"***************************************************************************
-.\" Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2012,2017 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inwstr.3x,v 1.8 2012/11/03 23:03:59 tom Exp $
+.\" $Id: curs_inwstr.3x,v 1.9 2017/10/28 23:42:58 tom Exp $
.TH curs_inwstr 3X ""
.SH NAME
\fBinwstr\fR,
.nf
\fB#include <curses.h> \fR
.sp
-\fBint inwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB);\fR
+\fBint inwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB);\fR
.br
-\fBint innwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+\fBint innwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
-\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
-\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
-\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
-\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
-\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
-\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.fi
.SH DESCRIPTION
-These routines return a string of \fBwchar_t\fR characters in \fIwstr\fR,
+.PP
+These routines return a string of \fBwchar_t\fR wide characters in \fIwstr\fR,
extracted starting at the current cursor position in the named window.
-Attributes are stripped from the characters.
+.PP
The four functions with \fIn\fR as the last argument return a leading substring at most
-\fIn\fR bytes long (exclusive of the trailing NUL).
-Transfer stops at the end of the current line, or when \fIn\fR bytes have
+\fIn\fR characters long (exclusive of the trailing NUL).
+Transfer stops at the end of the current line, or when \fIn\fR characters have
been stored at the location referenced by \fIwstr\fR.
.PP
-If the size \fIn\fR is not large enough to store a complete character,
+If the size \fIn\fR is not large enough to store a complete complex character,
an error is generated.
.SH NOTES
-Note that all routines except
+.PP
+All routines except
\fBwinnwstr\fR
may be macros.
+.PP
+Each cell in the window holds a complex character (i.e., base-
+and combining-characters) together with attributes and color.
+These functions store only the wide characters,
+ignoring attributes and color.
+Use \fBin_wchstr\fP to return the complex characters from a window.
.SH RETURN VALUE
All routines return
\fBERR\fR
#!@SHELL@
-# $Id: run_tic.in,v 1.34 2012/10/06 19:00:51 tom Exp $
+# $Id: run_tic.in,v 1.35 2017/10/24 00:16:22 tom Exp $
##############################################################################
-# Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2012,2017 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 "Software"), #
# Assumes:
# The leaf directory names (lib, tabset, terminfo)
#
-echo '** Building terminfo database, please wait...'
+echo "** Building terminfo database, please wait..."
#
# The script is designed to be run from the misc/Makefile as
# make install.data
fi
elif test "$TIC_PATH" = unknown
then
- echo '? no tic program found'
+ echo "? no tic program found"
exit 1
fi
else
export SHLIB_HOST
# don't use user's TERMINFO variable
-TERMINFO=${DESTDIR}$ticdir ; export TERMINFO
+unset TERMINFO_DIRS
+TERMINFO="${DESTDIR}$ticdir" ; export TERMINFO
umask 022
# Construct the name of the old (obsolete) pathname, e.g., /usr/lib/terminfo.
-TICDIR=`echo $TERMINFO | sed -e 's%/share/\([^/]*\)$%/lib/\1%'`
+TICDIR=`echo "$TERMINFO" | sed -e 's%/share/\([^/]*\)$%/lib/\1%'`
# Parent directory may not exist, which would confuse the install for hashed
# database. Fix.
# would generate a lot of confusing error messages if we tried to overwrite it.
# We explicitly remove its contents rather than the directory itself, in case
# the directory is actually a symbolic link.
-( test -d "$TERMINFO" && cd $TERMINFO && rm -fr ? 2>/dev/null )
+if test -d "$TERMINFO"
+then
+ ( cd "$TERMINFO" && rm -fr ? 2>/dev/null )
+elif test -f "$TERMINFO.db"
+then
+ ( rm -f "$TERMINFO.db" 2>/dev/null )
+fi
if test "$ext_funcs" = 1 ; then
cat <<EOF
document, and install the terminfo without the -x option.
EOF
-if ( $TIC_PATH -x -s -o $TERMINFO $source )
+if ( $TIC_PATH -x -s -o "$TERMINFO" $source )
then
- echo '** built new '$TERMINFO
+ echo "** built new $TERMINFO"
else
- echo '? tic could not build '$TERMINFO
+ echo "? tic could not build $TERMINFO"
exit 1
fi
else
document, and install the terminfo without the -x option.
EOF
-if ( $TIC_PATH -s -o $TERMINFO $source )
+if ( $TIC_PATH -s -o "$TERMINFO" $source )
then
- echo '** built new '$TERMINFO
+ echo "** built new $TERMINFO"
else
- echo '? tic could not build '$TERMINFO
+ echo "? tic could not build $TERMINFO"
exit 1
fi
fi
# all systems support symbolic links, and those that do provide a variety
# of options for 'test'.
if test "$TICDIR" != "$TERMINFO" ; then
- ( rm -f $TICDIR 2>/dev/null )
- if ( cd $TICDIR 2>/dev/null )
+ ( rm -f "$TICDIR" 2>/dev/null )
+ if ( cd "$TICDIR" 2>/dev/null )
then
- cd $TICDIR
+ cd "$TICDIR"
TICDIR=`pwd`
- if test $TICDIR != $TERMINFO ; then
+ if test "$TICDIR "!= "$TERMINFO "; then
# Well, we tried. Some systems lie to us, so the
# installer will have to double-check.
echo "Verify if $TICDIR and $TERMINFO are the same."
if test "$RELATIVE" != "$ticdir" ; then
RELATIVE=../`echo $ticdir|sed -e 's%^'$prefix'/%%' -e 's%^/%%'`
fi
- if ( @LN_S@ $RELATIVE $TICDIR )
+ if ( @LN_S@ "$RELATIVE" "$TICDIR" )
then
- echo '** sym-linked '$TICDIR' for compatibility'
+ echo "** sym-linked $TICDIR for compatibility"
else
- echo '** could not sym-link '$TICDIR' for compatibility'
+ echo "** could not sym-link $TICDIR for compatibility"
fi
fi
fi
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2017 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_box.c,v 1.24 2010/04/24 23:51:57 tom Exp $")
+MODULE_ID("$Id: lib_box.c,v 1.25 2017/10/27 21:56:17 tom Exp $")
#if USE_WIDEC_SUPPORT
static NCURSES_INLINE chtype
win->_line[endy].lastchar = win->_line[0].lastchar = endx;
for (i = 0; i <= endy; i++) {
+#if USE_WIDEC_SUPPORT
+ if (endx > 0 && isWidecExt(win->_line[i].text[endx])) {
+ SetChar2(win->_line[i].text[endx - 1], ' ');
+ }
+#endif
SetChar2(win->_line[i].text[0], wls);
SetChar2(win->_line[i].text[endx], wrs);
win->_line[i].firstchar = 0;
win->_line[i].lastchar = endx;
+#if USE_WIDEC_SUPPORT
+ if (isWidecExt(win->_line[i].text[1])) {
+ SetChar2(win->_line[i].text[1], ' ');
+ }
+#endif
}
SetChar2(win->_line[0].text[0], wtl);
SetChar2(win->_line[0].text[endx], wtr);
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_color.c,v 1.135 2017/08/19 23:48:19 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.136 2017/10/22 15:19:37 tom Exp $")
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
TYPE_REALLOC(colorpair_t, have, sp->_color_pairs);
if (sp->_color_pairs != 0) {
memset(sp->_color_pairs + sp->_pair_alloc, 0,
- sizeof(colorpair_t) * (have - sp->_pair_alloc));
+ sizeof(colorpair_t) * (size_t) (have - sp->_pair_alloc));
}
#endif
}
/****************************************************************************
- * Copyright (c) 1998-2010,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 *
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Sven Verdoolaege 2001 *
****************************************************************************/
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_hline.c,v 1.14 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.15 2017/10/28 19:57:42 tom Exp $")
NCURSES_EXPORT(int)
whline(WINDOW *win, chtype ch, int n)
SetChar2(wch, ch);
wch = _nc_render(win, wch);
+#if USE_WIDEC_SUPPORT
+ if (start > 0 && isWidecExt(line->text[start])) {
+ SetChar2(line->text[start - 1], ' ');
+ }
+ if (end < win->_maxx && isWidecExt(line->text[end + 1])) {
+ SetChar2(line->text[end + 1], ' ');
+ }
+#endif
while (end >= start) {
line->text[end] = wch;
end--;
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2017 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_pad.c,v 1.46 2010/04/24 23:50:45 tom Exp $")
+MODULE_ID("$Id: lib_pad.c,v 1.47 2017/10/22 19:57:26 tom Exp $")
NCURSES_EXPORT(WINDOW *)
NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
T(("pad being refreshed"));
+#ifdef TRACE
+ if (USE_TRACEF(TRACE_UPDATE)) {
+ _tracedump("...pad", win);
+ _nc_unlock_global(tracef);
+ }
+#endif /* TRACE */
#if USE_SCROLL_HINTS
if (win->_pad._pad_y >= 0) {
displaced = pminrow - win->_pad._pad_y
/****************************************************************************
- * Copyright (c) 1998-2010,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 *
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Sven Verdoolaege 2001 *
****************************************************************************/
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_vline.c,v 1.13 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_vline.c,v 1.14 2017/10/28 19:55:44 tom Exp $")
NCURSES_EXPORT(int)
wvline(WINDOW *win, chtype ch, int n)
while (end >= row) {
struct ldat *line = &(win->_line[end]);
+#if USE_WIDEC_SUPPORT
+ if (col > 0 && isWidecExt(line->text[col])) {
+ SetChar2(line->text[col - 1], ' ');
+ }
+ if (col < win->_maxx && isWidecExt(line->text[col + 1])) {
+ SetChar2(line->text[col + 1], ' ');
+ }
+#endif
line->text[col] = wch;
CHANGED_CELL(line, col);
end--;
#include <ctype.h>
-MODULE_ID("$Id: make_hash.c,v 1.14 2017/06/23 23:53:13 tom Exp $")
+MODULE_ID("$Id: make_hash.c,v 1.15 2017/10/23 21:19:54 tom Exp $")
/*
* _nc_make_hash_table()
free(hash_table);
#if NO_LEAKS
for (n = 0; (n < CAPTABSIZE); ++n) {
- free((char *) name_table[n].nte_name);
+ free((void *) name_table[n].nte_name);
}
free(name_table);
#endif
/****************************************************************************
- * Copyright (c) 2002-2011,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2016,2017 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_inwstr.c,v 1.7 2016/05/28 23:36:34 tom Exp $")
+MODULE_ID("$Id: lib_inwstr.c,v 1.8 2017/10/29 00:03:29 tom Exp $")
NCURSES_EXPORT(int)
winnwstr(WINDOW *win, wchar_t *wstr, int n)
if (win) {
int row, col;
int last = 0;
+ bool done = FALSE;
getyx(win, row, col);
text = win->_line[row].text;
- while (count < n && count != ERR) {
+ while (count < n && !done && count != ERR) {
if (!isWidecExt(text[col])) {
int inx;
&& ((wch = text[col].chars[inx]) != 0);
++inx) {
if (count + 1 > n) {
- if ((count = last) == 0) {
+ done = TRUE;
+ if (last == 0) {
count = ERR; /* error if we store nothing */
+ } else {
+ count = last; /* only store complete chars */
}
break;
}
-ncurses6 (6.0+20171021) unstable; urgency=low
+ncurses6 (6.0+20171028) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 15 Oct 2017 10:51:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 22 Oct 2017 06:49:45 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20171021) unstable; urgency=low
+ncurses6 (6.0+20171028) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 15 Oct 2017 10:51:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 22 Oct 2017 06:49:45 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20171021) unstable; urgency=low
+ncurses6 (6.0+20171028) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 15 Oct 2017 10:51:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 22 Oct 2017 06:49:45 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.236 2017/10/15 14:51:52 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.237 2017/10/22 10:49:45 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "0"\r
!define VERSION_YYYY "2017"\r
-!define VERSION_MMDD "1021"\r
+!define VERSION_MMDD "1028"\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.0
-Release: 20171021
+Release: 20171028
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20171021
+Release: 20171028
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.61 2017/06/24 18:42:23 tom Exp $
+-- $Id: README,v 1.63 2017/10/23 00:00:21 tom Exp $
-------------------------------------------------------------------------------
The programs in this directory are used to test and demonstrate ncurses.
libncurses:
----------
BC test: demo_termcap
-COLORS test: demo_new_pair dots_curses echochar ncurses picsmap savescreen xmas
-COLOR_PAIR test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels dots_curses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo 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 echochar ncurses newdemo savescreen
-COLS test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_curses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo 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
+COLORS test: demo_new_pair dots_curses dots_xcurses echochar ncurses picsmap savescreen xmas
+COLOR_PAIR test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels dots_curses echochar filter firework gdc hanoi ins_wide insdelln inserts knight 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 savescreen
+COLS test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels 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
ESCDELAY test: test_opaque
-LINES test: cardfile demo_defkey demo_keyok demo_menus demo_panels ditto dots_curses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo 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 demo_defkey demo_keyok demo_menus demo_panels ditto dots_curses dots_xcurses echochar firework hanoi 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 xmas
PAIR_NUMBER test: ncurses
PC test: demo_termcap
SP lib: form
add_wch test: demo_new_pair demo_panels ncurses picsmap test_add_wchstr test_addwstr
add_wchnstr test: test_add_wchstr
add_wchstr test: test_add_wchstr view
-addch test: background blue bs dots_curses echochar hashtest ncurses picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
+addch test: background blue bs dots_curses echochar hashtest ncurses padview picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
addchnstr test: test_addchstr
addchstr test: test_addchstr
addnstr test: test_addstr
-addnwstr test: ncurses test_addwstr
+addnwstr test: dots_xcurses ncurses test_addwstr
addstr test: blue bs cardfile filter gdc hanoi lrtest ncurses test_addstr
addwstr test: blue test_addwstr
-alloc_pair test: demo_new_pair
+alloc_pair test: demo_new_pair dots_xcurses
alloc_pair_sp -
assume_default_colors test: background ncurses
assume_default_colors_sp -
attr_get -
-attr_off test: ncurses
-attr_on test: ncurses
+attr_off test: dots_xcurses ncurses
+attr_on test: dots_xcurses ncurses
attr_set test: ncurses
attroff test: blue dots_curses echochar filter gdc ncurses tclock
attron test: blue bs dots_curses echochar filter gdc ncurses
attrset test: bs filter firework gdc hanoi insdelln ncurses picsmap rain tclock testaddch testcurs
baudrate test: ncurses
baudrate_sp test: sp_tinfo
-beep test: blue bs cardfile chgat clip_printw demo_forms demo_menus demo_new_pair demo_panels edit_field hanoi inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses popup_msg 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 xmas
+beep test: blue bs cardfile chgat clip_printw demo_forms demo_menus demo_new_pair demo_panels edit_field firstlast hanoi inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses padview popup_msg 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 xmas
beep_sp lib: ncurses
-bkgd test: background cardfile demo_forms ncurses savescreen tclock view
+bkgd test: background cardfile demo_forms ncurses padview savescreen tclock view
bkgdset test: background ncurses testaddch
bkgrnd test: ncurses
bkgrndset test: ncurses
box_set test: ncurses
can_change_color test: extended_color ncurses
can_change_color_sp test: extended_color
-cbreak test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo picsmap 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
+cbreak test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo padview picsmap 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
cbreak_sp test: sp_tinfo
chgat test: chgat
-clear test: blue bs filter gdc ncurses testcurs xmas
+clear test: blue bs filter gdc ncurses padview testcurs xmas
clearok test: bs knight
-clrtobot test: demo_menus ncurses
-clrtoeol test: blue bs demo_altkeys filter foldkeys form_driver_w hanoi hashtest movewindow ncurses view
+clrtobot test: demo_menus ncurses view
+clrtoeol test: blue bs demo_altkeys filter foldkeys form_driver_w hanoi hashtest movewindow ncurses padview view
color_content test: ncurses picsmap
color_content_sp -
-color_set test: color_set extended_color ncurses
+color_set test: color_set dots_xcurses extended_color ncurses
copywin test: ncurses testcurs
cur_term test: demo_termcap demo_terminfo dots dots_mvcur filter list_keys lrtest sp_tinfo test_sgr test_vid_puts test_vidputs progs: clear_cmd reset_cmd tabs tput tset
-curs_set test: demo_new_pair echochar firework gdc hanoi lrtest ncurses newdemo rain savescreen tclock testcurs worm xmas
+curs_set test: demo_new_pair echochar firework gdc hanoi lrtest ncurses newdemo picsmap rain savescreen tclock testcurs worm xmas
curs_set_sp test: sp_tinfo
-curscr test: demo_panels knight lrtest ncurses popup_msg savescreen tclock view
-curses_version test: ncurses progs: infocmp tabs tic toe tput tset
+curscr test: demo_panels knight lrtest ncurses popup_msg savescreen tclock
+curses_version test: ncurses progs: clear infocmp tabs tic toe tput tset
def_prog_mode test: bs ncurses
def_prog_mode_sp test: sp_tinfo
def_shell_mode -
delch -
deleteln test: insdelln
delscreen test: ditto dots_mvcur
-delwin test: cardfile chgat clip_printw demo_forms demo_panels inch_wide inchs ins_wide insdelln inserts 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
+delwin test: cardfile chgat clip_printw demo_forms demo_panels inch_wide inchs ins_wide insdelln inserts 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
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
-doupdate test: cardfile demo_menus demo_panels ditto ins_wide inserts knight movewindow ncurses popup_msg redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr
+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 test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw
echo_sp lib: ncurses
echo_wchar test: ncurses
echochar test: echochar ncurses
-endwin test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dots_curses dots_mvcur 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 movewindow ncurses newdemo picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
+endwin test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dots_curses dots_mvcur dots_xcurses 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 movewindow ncurses newdemo padview picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque 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
getbkgd test: ncurses
getbkgrnd test: ncurses
getcchar test: ncurses savescreen view
-getch test: background blue bs chgat color_set demo_altkeys demo_new_pair extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest savescreen tclock test_opaque testaddch testcurs view xmas
-getcurx test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs
-getcury test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses popup_msg redraw savescreen test_opaque testcurs
-getmaxx test: chgat clip_printw demo_panels inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-getmaxy test: chgat clip_printw demo_forms demo_panels inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
+getch test: background blue bs chgat color_set demo_altkeys demo_new_pair extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest padview picsmap savescreen tclock test_opaque testaddch testcurs view xmas
+getcurx test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs view
+getcury test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses popup_msg redraw savescreen test_opaque testcurs view
+getmaxx test: chgat clip_printw demo_panels firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
+getmaxy test: chgat clip_printw demo_forms demo_panels firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
getmouse test: bs demo_menus knight movewindow ncurses testcurs
getmouse_sp -
getn_wstr test: test_get_wstr
getstr test: test_getstr
getwin test: ncurses
getwin_sp -
-halfdelay test: view
+halfdelay test: padview view
halfdelay_sp test: sp_tinfo
-has_colors test: background bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs view worm xmas
+has_colors test: background bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs view worm xmas
has_colors_sp lib: ncurses
has_ic test: lrtest ncurses
has_ic_sp test: sp_tinfo
hline test: gdc ncurses
hline_set -
idcok test: test_opaque
-idlok test: ncurses test_opaque testscanw view
+idlok test: ncurses padview test_opaque testscanw view
immedok test: test_opaque
in_wch test: inch_wide
in_wchnstr test: inch_wide
init_extended_color_sp test: extended_color
init_extended_pair test: extended_color picsmap
init_extended_pair_sp test: extended_color
-init_pair test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
+init_pair test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
init_pair_sp -
-initscr test: background blue bs cardfile chgat clip_printw color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
+initscr test: background blue bs cardfile chgat clip_printw color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_xcurses echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight 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 testaddch testcurs testscanw view worm xmas
innstr test: test_instr
innwstr test: test_inwstr
ins_nwstr test: ins_wide
key_name test: key_names ncurses
keybound test: demo_altkeys demo_defkey
keybound_sp test: sp_tinfo
-keyname test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw test_getstr testcurs view progs: tic
+keyname test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses padview redraw test_getstr testcurs view progs: tic
keyname_sp test: sp_tinfo
keyok test: demo_keyok foldkeys
keyok_sp test: sp_tinfo
-keypad test: bs cardfile chgat clip_printw demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto filter firework foldkeys form_driver_w hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
+keypad test: bs cardfile chgat clip_printw demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto filter firework foldkeys form_driver_w hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses padview popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
killchar test: ncurses
killchar_sp test: sp_tinfo
killwchar test: ncurses
mouseinterval_sp -
mousemask test: bs demo_forms demo_menus knight movewindow ncurses testcurs
mousemask_sp -
-move test: blue bs cardfile chgat demo_altkeys demo_menus demo_new_pair dots_curses echochar filter foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testscanw view xmas
+move test: blue bs cardfile chgat demo_altkeys demo_menus demo_new_pair dots_curses dots_xcurses echochar filter foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testscanw view xmas
mvadd_wch test: ncurses test_add_wchstr test_addwstr
mvadd_wchnstr test: test_add_wchstr
mvadd_wchstr test: test_add_wchstr
mvderwin test: movewindow
mvget_wch -
mvget_wstr test: test_get_wstr
-mvgetch test: picsmap
+mvgetch -
mvgetn_wstr test: test_get_wstr
mvgetnstr test: test_getstr
mvgetstr test: test_getstr
mvinsstr test: inserts
mvinstr test: test_instr
mvinwstr test: test_inwstr
-mvprintw test: background bs firework form_driver_w hanoi ncurses savescreen tclock view
+mvprintw test: background bs firework form_driver_w hanoi ncurses padview savescreen tclock view
mvscanw -
mvvline test: ncurses
mvvline_set test: ncurses
mvwscanw test: testcurs
mvwvline test: ins_wide inserts movewindow test_add_wchstr test_addchstr test_addstr test_addwstr
mvwvline_set -
-napms test: demo_panels ditto dots dots_curses dots_mvcur echochar extended_color firework gdc hanoi lrtest ncurses railroad rain tclock test_opaque testcurs view worm xmas progs: tset
+napms test: demo_panels ditto dots dots_curses dots_mvcur dots_xcurses echochar extended_color firework firstlast gdc hanoi lrtest ncurses padview picsmap railroad rain tclock test_opaque testcurs view worm xmas progs: tset
napms_sp test: sp_tinfo
new_prescr test: sp_tinfo
-newpad test: ncurses popup_msg testcurs
+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_termattrs
+newterm test: demo_altkeys demo_new_pair ditto dots_mvcur extended_color filter foldkeys gdc key_names keynames redraw 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 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_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
newwin_sp lib: ncurses
nl test: demo_forms 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 rain tclock test_opaque view worm xmas
-noecho test: background bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses picsmap rain redraw 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
+nodelay test: demo_new_pair ditto extended_color firework gdc lrtest ncurses newdemo padview rain tclock test_opaque view worm xmas
+noecho test: background bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses padview picsmap rain redraw 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
noecho_sp lib: ncurses
nofilter -
nofilter_sp -
-nonl test: bs demo_forms hashtest movewindow ncurses view worm xmas
+nonl test: bs demo_forms hashtest movewindow ncurses padview view worm xmas
nonl_sp lib: ncurses
noqiflush -
noqiflush_sp test: sp_tinfo
pair_content_sp lib: ncurses
pecho_wchar -
pechochar -
-pnoutrefresh test: ncurses popup_msg
+pnoutrefresh test: ncurses padview popup_msg
prefresh test: testcurs
printw test: background blue bs color_set demo_altkeys demo_defkey demo_keyok extended_color filter foldkeys ncurses savescreen testcurs testscanw view
putp test: filter test_sgr progs: tput
qiflush_sp test: sp_tinfo
raw test: demo_forms ncurses redraw testcurs
raw_sp test: sp_tinfo
-redrawwin test: redraw view
-refresh test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view xmas
+redrawwin test: padview redraw view
+refresh test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_mvcur dots_xcurses echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest movewindow ncurses picsmap savescreen tclock testcurs view xmas
+reset_color_pairs test: picsmap
+reset_color_pairs_sp -
reset_prog_mode test: filter ncurses
reset_prog_mode_sp test: sp_tinfo
-reset_shell_mode test: bs filter savescreen
+reset_shell_mode test: bs filter savescreen test_setupterm
reset_shell_mode_sp test: sp_tinfo
resetty -
resetty_sp test: sp_tinfo
-resize_term test: view
+resize_term -
resize_term_sp -
resizeterm -
resizeterm_sp lib: ncurses
-restartterm -
+restartterm test: test_setupterm
restartterm_sp -
ripoffline test: demo_menus ncurses
ripoffline_sp -
set_tabsize test: test_opaque
set_tabsize_sp test: sp_tinfo
set_term lib: ncurses
-setcchar test: demo_new_pair demo_panels ins_wide ncurses picsmap test_add_wchstr test_addwstr view
+setcchar test: demo_new_pair demo_panels ins_wide ncurses picsmap test_add_wchstr test_addwstr
setscrreg test: view
setupterm test: demo_terminfo dots list_keys sp_tinfo test_setupterm test_sgr test_termattrs test_vid_puts test_vidputs progs: clear tabs tput tset
slk_attr -
slk_wset test: ncurses
standend test: blue gdc ncurses
standout test: blue ncurses
-start_color test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
+start_color test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
start_color_sp -
-stdscr test: bs chgat clip_printw demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto 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 movewindow ncurses picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
+stdscr test: bs chgat clip_printw demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto 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 movewindow ncurses padview picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque 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 progs: dump_entry infocmp tic
tgoto test: dots_termcap railroad progs: tic
tigetflag test: demo_terminfo progs: tic tput
tigetflag_sp test: sp_tinfo
-tigetnum test: demo_terminfo ncurses progs: tput
+tigetnum test: demo_terminfo dots dots_mvcur ncurses progs: tput
tigetnum_sp test: sp_tinfo
tigetstr test: blue demo_defkey demo_new_pair demo_terminfo foldkeys list_keys test_sgr testcurs progs: clear_cmd tput
tigetstr_sp test: sp_tinfo
tparm test: dots dots_mvcur test_sgr progs: reset_cmd tabs tic tput
tputs test: dots dots_mvcur dots_termcap railroad test_vid_puts test_vidputs progs: clear_cmd reset_cmd tabs
tputs_sp test: sp_tinfo
-trace test: demo_menus hashtest lrtest ncurses redraw test_sgr test_termattrs test_vid_puts test_vidputs testcurs view worm
+trace test: demo_menus hashtest lrtest ncurses padview redraw test_sgr test_termattrs test_vid_puts test_vidputs testcurs view worm
ttytype test: demo_terminfo test_sgr
typeahead test: testcurs
typeahead_sp test: sp_tinfo
ungetmouse lib: menu
ungetmouse_sp -
untouchwin lib: form
-use_default_colors test: background filter firework gdc hanoi knight ncurses rain tclock worm xmas
+use_default_colors test: background dots_curses dots_xcurses filter firework gdc hanoi knight ncurses rain tclock worm xmas
use_default_colors_sp -
-use_env test: ncurses progs: tput
+use_env test: dots dots_curses dots_mvcur dots_xcurses ncurses progs: clear tput
use_env_sp test: sp_tinfo
use_extended_names test: demo_termcap demo_terminfo list_keys progs: infocmp tic
use_legacy_coding -
use_legacy_coding_sp -
use_screen test: ditto
-use_tioctl test: ncurses
+use_tioctl test: ncurses progs: clear tput
use_tioctl_sp test: sp_tinfo
use_window test: rain worm
vid_attr test: test_vid_puts
wadd_wch test: inch_wide ncurses test_add_wchstr test_addwstr
wadd_wchnstr test: savescreen test_add_wchstr
wadd_wchstr test: test_add_wchstr
-waddch test: demo_forms demo_panels ditto firstlast inch_wide inchs knight ncurses popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque worm
+waddch test: demo_forms demo_panels ditto firstlast inch_wide inchs knight 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 view worm
waddchnstr test: test_addchstr
waddchstr test: test_addchstr
waddnstr test: demo_forms test_addstr
waddnwstr test: ncurses test_addwstr
waddstr test: chgat clip_printw demo_forms demo_panels firstlast ins_wide insdelln knight ncurses popup_msg redraw test_add_wchstr test_addstr test_addwstr testcurs
-waddwstr test: ins_wide ncurses test_add_wchstr test_addwstr test_get_wstr
+waddwstr test: ins_wide ncurses padview test_add_wchstr test_addwstr test_get_wstr view
wattr_get test: ncurses
wattr_off lib: ncurses
wattr_on lib: ncurses
wattr_set test: ncurses
wattroff test: demo_forms ncurses testcurs xmas
wattron test: testcurs xmas
-wattrset test: clip_printw demo_forms insdelln ncurses newdemo test_get_wstr test_getstr testcurs xmas
-wbkgd test: cardfile demo_forms demo_menus ncurses newdemo testcurs
+wattrset test: clip_printw demo_forms insdelln ncurses newdemo padview test_get_wstr test_getstr testcurs xmas
+wbkgd test: cardfile demo_forms demo_menus ncurses newdemo padview testcurs
wbkgdset test: demo_panels ins_wide inserts ncurses test_add_wchstr test_addchstr test_addstr test_addwstr
wbkgrnd lib: ncurses
wbkgrndset lib: ncurses
wecho_wchar lib: ncurses
wechochar lib: ncurses
wenclose test: ncurses
-werase test: cardfile demo_forms demo_menus demo_panels firstlast knight ncurses newdemo popup_msg test_get_wstr test_getstr test_opaque testcurs xmas
+werase test: cardfile demo_forms demo_menus demo_panels firstlast knight ncurses newdemo popup_msg test_get_wstr test_getstr test_opaque testcurs view xmas
wget_wch test: ins_wide ncurses test_add_wchstr test_addwstr
wget_wstr test: test_get_wstr
wgetbkgrnd lib: ncurses
whline test: testcurs
whline_set lib: ncurses
win_wch test: inch_wide savescreen
-win_wchnstr test: inch_wide
+win_wchnstr test: inch_wide view
win_wchstr test: inch_wide
winch test: inchs knight testcurs
winchnstr test: inchs
winstr test: test_instr
winwstr test: test_inwstr
wmouse_trafo test: ncurses
-wmove test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs worm
-wnoutrefresh test: demo_menus ditto inch_wide inchs ins_wide inserts knight 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
+wmove test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo padview picsmap redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
+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_opaque testcurs
wredrawln test: redraw
-wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels firstlast ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs view worm xmas
+wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels firstlast ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs worm xmas
wresize test: cardfile demo_menus ncurses
wscanw test: testcurs
wscrl test: ncurses testcurs
update_panels test: cardfile demo_panels ncurses
update_panels_sp -
--- vile:txtmode
+--- vile:txtmode
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: dots.c,v 1.31 2017/10/22 00:44:06 tom Exp $
+ * $Id: dots.c,v 1.32 2017/10/22 15:20:57 tom Exp $
*
* A simple demo of the terminfo interface.
*/
}
static int
-get_number(const char *cap, int map)
+get_number(NCURSES_CONST char *cap, int map)
{
int result = map;
if (cap != 0) {
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_curses.c,v 1.9 2017/10/22 00:44:39 tom Exp $
+ * $Id: dots_curses.c,v 1.10 2017/10/23 08:42:40 tom Exp $
*
* A simple demo of the curses interface used for comparison with termcap.
*/
d_option = TRUE;
break;
#endif
+#if HAVE_USE_ENV
case 'e':
use_env(TRUE);
break;
+#endif
case 'm':
m_option = atoi(optarg);
break;
/*
* Author: Thomas E. Dickey - 2007
*
- * $Id: dots_mvcur.c,v 1.17 2017/10/22 00:44:39 tom Exp $
+ * $Id: dots_mvcur.c,v 1.18 2017/10/22 15:22:43 tom Exp $
*
* A simple demo of the terminfo interface, and mvcur.
*/
}
static int
-get_number(const char *cap, int map)
+get_number(NCURSES_CONST char *cap, int map)
{
int result = map;
if (cap != 0) {
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_termcap.c,v 1.15 2017/10/22 00:49:45 tom Exp $
+ * $Id: dots_termcap.c,v 1.16 2017/10/22 15:21:34 tom Exp $
*
* A simple demo of the termcap interface.
*/
static char *t_vi;
static struct {
- const char *name;
+ NCURSES_CONST char *name;
char **value;
} my_caps[] = {
}
static int
-get_number(const char *cap, const char *env)
+get_number(NCURSES_CONST char *cap, const char *env)
{
int result = tgetnum(cap);
char *value = env ? getenv(env) : 0;
-# $Id: modules,v 1.65 2017/10/11 08:08:41 tom Exp $
+# $Id: modules,v 1.66 2017/10/22 16:06:33 tom Exp $
##############################################################################
# Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. #
# #
movewindow progs $(srcdir) $(HEADER_DEPS) $(srcdir)/popup_msg.h
ncurses progs $(srcdir) $(HEADER_DEPS) ../include/panel.h ../include/menu.h ../include/form.h
newdemo progs $(srcdir) $(HEADER_DEPS)
+padview progs $(srcdir) $(HEADER_DEPS) $(srcdir)/widechars.h $(srcdir)/popup_msg.h
picsmap progs $(srcdir) $(HEADER_DEPS)
popup_msg progs $(srcdir) $(HEADER_DEPS) $(srcdir)/popup_msg.h
railroad progs $(srcdir) $(HEADER_DEPS)
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.470 2017/10/20 21:20:47 tom Exp $
+$Id: ncurses.c,v 1.487 2017/10/28 00:54:41 tom Exp $
***************************************************************************/
{
printw("\nThis %s terminal %s\n\n", getenv("TERM"), what);
Pause();
+ endwin();
}
static void
while (!done) {
int shown = 0;
+ double colors_max2 = (double) colors_max * (double) colors_max;
pairs_max = PAIR_NUMBER(A_COLOR) + 1;
- if (colors_max * colors_max <= COLOR_PAIRS) {
+ if (colors_max2 <= COLOR_PAIRS) {
int limit = (colors_max - MinColors) * (colors_max - MinColors);
if (pairs_max > limit)
pairs_max = limit;
- } else {
- if (pairs_max > COLOR_PAIRS)
- pairs_max = COLOR_PAIRS;
}
+ if (pairs_max < COLOR_PAIRS)
+ pairs_max = COLOR_PAIRS;
/* this assumes an 80-column line */
if (opt_wide) {
while (!done) {
int shown = 0;
+ double colors_max2 = (double) colors_max * (double) colors_max;
- pairs_max = (unsigned short) (-1);
- if (colors_max * colors_max <= COLOR_PAIRS) {
+ pairs_max = ((unsigned) (-1)) / 2;
+ if (colors_max2 <= COLOR_PAIRS) {
int limit = (colors_max - MinColors) * (colors_max - MinColors);
if (pairs_max > limit)
pairs_max = limit;
- } else {
- if (pairs_max > COLOR_PAIRS)
- pairs_max = COLOR_PAIRS;
}
+ if (pairs_max > COLOR_PAIRS)
+ pairs_max = COLOR_PAIRS;
if (opt_wide) {
width = 4;
****************************************************************************/
#if HAVE_COPYWIN /* ...and overlay, overwrite */
+
+static WINDOW *
+make_overlap(int n)
+{
+ WINDOW *result;
+ int y, x;
+
+ getmaxyx(stdscr, y, x);
+ if (y < 23 || x < 80) {
+ Cannot("The screen is too small for this test");
+ result = 0;
+ } else {
+ const int H_SIZE = 1; /* header-size */
+ const int F_SIZE = 6; /* footer-size */
+ int ymax = y - (H_SIZE + F_SIZE);
+ int high = ymax / 5; /* equal-sized parts for cross */
+ int xmax = x - 2; /* margin */
+ int wide = (xmax / 5) & ~1;
+ int lmar, tmar;
+
+ if (high > 8)
+ high = 8;
+
+ if (wide > 8)
+ wide = 8;
+
+ tmar = (ymax - (5 * high)) / 2 + H_SIZE;
+ lmar = (xmax - (5 * wide)) / 2;
+
+ if (n == 0) {
+ result = newwin(3 * high, 3 * wide, tmar, lmar);
+ } else {
+ result = newwin(3 * high, 3 * wide, tmar + 2 * high, lmar + 2 * wide);
+ }
+ }
+ return result;
+}
+
static void
fillwin(WINDOW *win, char ch)
{
}
}
+#define InCross(x,y, x1,y1) \
+ (((x > (x1 - 1) / 3) && (x <= (2 * (x1 - 1)) / 3)) \
+ || (((y > (y1 - 1) / 3) && (y <= (2 * (y1 - 1)) / 3))))
+
static void
crosswin(WINDOW *win, char ch)
{
int y, x;
int y1, x1;
+ int xw = 1;
getmaxyx(win, y1, x1);
for (y = 0; y < y1; y++) {
- for (x = 0; x < x1; x++)
- if (((x > (x1 - 1) / 3) && (x <= (2 * (x1 - 1)) / 3))
- || (((y > (y1 - 1) / 3) && (y <= (2 * (y1 - 1)) / 3)))) {
+ for (x = 0; x < x1; x += xw) {
+ if (InCross(x, y, x1, y1)) {
wmove(win, y, x);
waddch(win, UChar(ch));
}
+ }
}
}
-#define OVERLAP_FLAVORS 5
+/*
+ * Match "crosswin()", but using line-drawing characters. This could be done
+ * a little simpler using box(), but the reason for this example is to test
+ * hline/vline and addch with line-drawing vs the copy/overlay functions.
+ */
+static void
+crossbox(WINDOW *win)
+{
+ int y1, x1;
+ int ymax, xmax;
+
+ getmaxyx(win, y1, x1);
+
+ ymax = (y1 + 1);
+ xmax = (x1 + 1);
+
+ mvwhline(win, 0, (xmax / 3), ACS_HLINE, (xmax / 3));
+ mvwhline(win, ymax / 3, 0, ACS_HLINE, xmax);
+ mvwhline(win, ((2 * ymax) / 3) - 1, 0, ACS_HLINE, xmax);
+ mvwhline(win, y1 - 1, (xmax / 3), ACS_HLINE, (xmax / 3));
+
+ mvwvline(win, (ymax / 3), 0, ACS_VLINE, (ymax / 3));
+ mvwvline(win, 0, xmax / 3, ACS_VLINE, ymax);
+ mvwvline(win, 0, ((2 * xmax) / 3) - 1, ACS_VLINE, ymax);
+ mvwvline(win, (ymax / 3), x1 - 1, ACS_VLINE, (ymax / 3));
+
+ mvwaddch(win, 0, (xmax / 3), ACS_ULCORNER);
+ mvwaddch(win, 0, ((2 * xmax) / 3) - 1, ACS_URCORNER);
+ mvwaddch(win, y1 - 1, (xmax / 3), ACS_LLCORNER);
+ mvwaddch(win, y1 - 1, ((2 * xmax) / 3) - 1, ACS_LRCORNER);
+
+ mvwaddch(win, (ymax / 3), 0, ACS_ULCORNER);
+ mvwaddch(win, ((2 * ymax) / 3) - 1, 0, ACS_LLCORNER);
+ mvwaddch(win, (ymax / 3), x1 - 1, ACS_URCORNER);
+ mvwaddch(win, ((2 * ymax) / 3) - 1, x1 - 1, ACS_LRCORNER);
+
+ mvwaddch(win, (ymax / 3), (xmax / 3), ACS_PLUS);
+ mvwaddch(win, (ymax / 3), ((2 * xmax) / 3) - 1, ACS_PLUS);
+ mvwaddch(win, ((2 * ymax) / 3) - 1, ((2 * xmax) / 3) - 1, ACS_PLUS);
+ mvwaddch(win, ((2 * ymax) / 3) - 1, (xmax / 3), ACS_PLUS);
+}
+
+typedef enum {
+ otBASE_refresh = 0
+ ,otBASE_fill
+ ,otBASE_draw
+ ,otBASE_clear
+ ,otBASE_copy
+} otBASE;
+
+#define OVERLAP_FLAVORS 6
+
+typedef enum {
+ otFILL_normal = 0
+ ,otFILL_bold
+ ,otFILL_color
+ ,otFILL_bright
+} otFILL;
+
+#define LimitFILL() UseColors ? 4 : 2
+
+typedef enum {
+ otDRAW_text_cross = 0
+ ,otDRAW_line_box
+ ,otDRAW_line_cross
+ ,otDRAW_set_bg
+ ,otDRAW_reset_bg
+} otDRAW;
+
+#define LimitDRAW() UseColors ? 5 : 3
+
+typedef enum {
+ otCOPY_overwrite = 0
+ ,otCOPY_merge
+ ,otCOPY_force
+ ,otCOPY_overlay
+} otCOPY;
+
+#define LimitCOPY() 4
static void
overlap_helpitem(int state, int item, char *message)
{
NCURSES_PAIRS_T cpair = (NCURSES_PAIRS_T) (1 + (flavor * 2) + col);
- switch (flavor) {
- case 0:
+ switch ((otFILL) flavor) {
+ case otFILL_normal:
(void) wattrset(win, A_NORMAL);
break;
- case 1:
+ case otFILL_bold:
(void) wattrset(win, A_BOLD);
break;
- case 2:
+ case otFILL_color:
init_pair(cpair, COLOR_BLUE, COLOR_WHITE);
(void) wattrset(win, AttrArg(COLOR_PAIR(cpair), A_NORMAL));
break;
- case 3:
+ case otFILL_bright:
init_pair(cpair, COLOR_WHITE, COLOR_BLUE);
(void) wattrset(win, AttrArg(COLOR_PAIR(cpair), A_BOLD));
break;
{
NCURSES_PAIRS_T cpair = (NCURSES_PAIRS_T) (9 + (flavor * 2) + col);
- switch (flavor) {
- case 0:
+ switch ((otDRAW) flavor) {
+ case otDRAW_text_cross:
/* no effect */
break;
- case 1:
+ case otDRAW_line_box:
/* no effect */
break;
- case 2:
+ case otDRAW_line_cross:
+ /* no effect */
+ break;
+ case otDRAW_set_bg:
init_pair(cpair, COLOR_RED, COLOR_GREEN);
wbkgdset(win, colored_chtype(' ', A_BLINK, cpair));
break;
- case 3:
+ case otDRAW_reset_bg:
wbkgdset(win, ' ' | A_NORMAL);
break;
}
int row;
int col;
int item;
+ int limit[OVERLAP_FLAVORS];
const char *ths, *tht;
char msg[80];
ths = col ? "B" : "A";
tht = col ? "A" : "B";
- switch (row) {
- case 0:
+ switch ((otBASE) row) {
+ case otBASE_refresh:
+ limit[row] = 1;
flavors[row] = 0;
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"refresh %s, then %s, then doupdate.", ths, tht);
break;
- case 1:
- if (UseColors) {
- flavors[row] %= 4;
- } else {
- flavors[row] %= 2;
- }
+ case otBASE_fill:
+ limit[row] = LimitFILL();
+ flavors[row] %= limit[row];
overlap_test_1_attr(stdscr, flavors[row], col);
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"fill window %s with letter %s.", ths, ths);
break;
- case 2:
- if (UseColors) {
- flavors[row] %= 4;
- } else {
- flavors[row] %= 2;
- }
- switch (flavors[row]) {
- case 0:
+ case otBASE_draw:
+ limit[row] = LimitDRAW();
+ flavors[row] %= limit[row];
+ switch ((otDRAW) flavors[row]) {
+ case otDRAW_text_cross:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
- "cross pattern in window %s.", ths);
+ "cross text-pattern in window %s.", ths);
break;
- case 1:
+ case otDRAW_line_box:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
- "draw box in window %s.", ths);
+ "draw line-box in window %s.", ths);
break;
- case 2:
+ case otDRAW_line_cross:
+ _nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
+ "draw line-cross in window %s.", ths);
+ break;
+ case otDRAW_set_bg:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"set background of window %s.", ths);
break;
- case 3:
+ case otDRAW_reset_bg:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"reset background of window %s.", ths);
break;
}
break;
- case 3:
+ case otBASE_clear:
+ limit[row] = 1;
flavors[row] = 0;
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"clear window %s.", ths);
break;
- case 4:
- flavors[row] %= 4;
- switch (flavors[row]) {
- case 0:
+ case otBASE_copy:
+ limit[row] = LimitCOPY();
+ flavors[row] %= limit[row];
+ switch ((otCOPY) flavors[row]) {
+ case otCOPY_overwrite:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"overwrite %s onto %s.", ths, tht);
break;
- case 1:
+ case otCOPY_merge:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"copywin(FALSE) %s onto %s.", ths, tht);
break;
- case 2:
+ case otCOPY_force:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"copywin(TRUE) %s onto %s.", ths, tht);
break;
- case 3:
+ case otCOPY_overlay:
_nc_SPRINTF(msg, _nc_SLIMIT(sizeof(msg))
"overlay %s onto %s.", ths, tht);
break;
wbkgdset(stdscr, ' ' | A_NORMAL);
}
move(LINES - 1, 0);
- printw("^Q/ESC = terminate test. Up/down/space select test variations (%d %d).",
- state, flavors[state]);
+ printw("^Q/ESC = terminate test. Up/down/space select tests (row %d",
+ state + 1);
+ if (limit[state] > 1)
+ printw(" test %d:%d", 1 + flavors[state], limit[state]);
+ printw(").");
+ clrtoeol();
return state;
}
overlap_test_2(int flavor, int col, WINDOW *a, char fill)
{
overlap_test_2_attr(a, flavor, col);
- switch (flavor) {
- case 0:
+ switch ((otDRAW) flavor) {
+ case otDRAW_text_cross:
crosswin(a, fill);
break;
- case 1:
+ case otDRAW_line_box:
box(a, 0, 0);
break;
- case 2:
+ case otDRAW_line_cross:
+ crossbox(a);
+ break;
+ case otDRAW_set_bg:
/* done in overlap_test_2_attr */
break;
- case 3:
+ case otDRAW_reset_bg:
/* done in overlap_test_2_attr */
break;
}
static void
overlap_test_4(int flavor, WINDOW *a, WINDOW *b)
{
- switch (flavor) {
- case 0:
+ switch ((otCOPY) flavor) {
+ case otCOPY_overwrite:
overwrite(a, b);
break;
- case 1:
+ case otCOPY_merge:
copywin(a, b, 0, 0, 0, 0, getmaxy(b), getmaxx(b), FALSE);
break;
- case 2:
+ case otCOPY_force:
copywin(a, b, 0, 0, 0, 0, getmaxy(b), getmaxx(b), TRUE);
break;
- case 3:
+ case otCOPY_overlay:
overlay(a, b);
break;
}
static int
overlap_test(bool recur GCC_UNUSED)
{
+ WINDOW *win1, *win2;
+ int ch;
+ int state, flavor[OVERLAP_FLAVORS];
+
+ if ((win1 = make_overlap(0)) == 0
+ || (win2 = make_overlap(1)) == 0)
+ return ERR;
+
+ curs_set(0);
+ raw();
+ refresh();
+ move(0, 0);
+ printw("Test wnoutrefresh() for two overlapping windows:");
+
+ memset(flavor, 0, sizeof(flavor));
+ state = overlap_help(0, flavor);
+
+ while (!isQuit(ch = Getchar(), TRUE)) {
+ switch (ch) {
+ case 'a': /* refresh window A first, then B */
+ overlap_test_0(win1, win2);
+ break;
+
+ case 'b': /* refresh window B first, then A */
+ overlap_test_0(win2, win1);
+ break;
+
+ case 'c': /* fill window A so it's visible */
+ overlap_test_1(flavor[otBASE_fill], 0, win1, 'A');
+ break;
+
+ case 'd': /* fill window B so it's visible */
+ overlap_test_1(flavor[otBASE_fill], 1, win2, 'B');
+ break;
+
+ case 'e': /* cross test pattern in window A */
+ overlap_test_2(flavor[otBASE_draw], 0, win1, 'A');
+ break;
+
+ case 'f': /* cross test pattern in window A */
+ overlap_test_2(flavor[otBASE_draw], 1, win2, 'B');
+ break;
+
+ case 'g': /* clear window A */
+ overlap_test_3(win1);
+ break;
+
+ case 'h': /* clear window B */
+ overlap_test_3(win2);
+ break;
+
+ case 'i': /* overwrite A onto B */
+ overlap_test_4(flavor[otBASE_copy], win1, win2);
+ break;
+
+ case 'j': /* overwrite B onto A */
+ overlap_test_4(flavor[otBASE_copy], win2, win1);
+ break;
+
+ case CTRL('n'):
+ case KEY_DOWN:
+ state = overlap_help(state + 1, flavor);
+ break;
+
+ case CTRL('p'):
+ case KEY_UP:
+ state = overlap_help(state - 1, flavor);
+ break;
+
+ case ' ':
+ flavor[state] += 1;
+ state = overlap_help(state, flavor);
+ break;
+
+ case HELP_KEY_1:
+ state = overlap_help(state, flavor);
+ break;
+
+ default:
+ beep();
+ break;
+ }
+ }
+
+ delwin(win2);
+ delwin(win1);
+ erase();
+ exit_curses();
+ return OK;
+}
+
+#if USE_WIDEC_SUPPORT
+static void
+x_fillwin(WINDOW *win, wchar_t ch)
+{
+ int y, x;
+ int y1, x1;
+
+ getmaxyx(win, y1, x1);
+ x1 /= 2;
+ for (y = 0; y < y1; y++) {
+ wmove(win, y, 0);
+ for (x = 0; x < x1; x++)
+ waddnwstr(win, &ch, 1);
+ }
+}
+
+static void
+x_crosswin(WINDOW *win, wchar_t ch)
+{
+ int y, x;
+ int y1, x1;
+ int xw = 2;
+
+ getmaxyx(win, y1, x1);
+ for (y = 0; y < y1; y++) {
+ for (x = 0; x < x1; x += xw) {
+ if (InCross(x, y, x1, y1)) {
+ wmove(win, y, x);
+ waddnwstr(win, &ch, 1);
+ }
+ }
+ }
+}
+
+static void
+x_overlap_test_1(int flavor, int col, WINDOW *a, wchar_t fill)
+{
+ overlap_test_1_attr(a, flavor, col);
+ x_fillwin(a, fill);
+ (void) wattrset(a, A_NORMAL);
+}
+
+static void
+x_overlap_test_2(int flavor, int col, WINDOW *a, wchar_t fill)
+{
+ overlap_test_2_attr(a, flavor, col);
+ switch ((otDRAW) flavor) {
+ case otDRAW_text_cross:
+ x_crosswin(a, fill);
+ break;
+ case otDRAW_line_box:
+ box(a, 0, 0);
+ break;
+ case otDRAW_line_cross:
+ crossbox(a);
+ break;
+ case otDRAW_set_bg:
+ /* done in overlap_test_2_attr */
+ break;
+ case otDRAW_reset_bg:
+ /* done in overlap_test_2_attr */
+ break;
+ }
+}
+
+/* test effects of overlapping windows */
+static int
+x_overlap_test(bool recur GCC_UNUSED)
+{
+ const wchar_t WIDE_A = 0xff21;
+ const wchar_t WIDE_B = 0xff22;
+ WINDOW *win1, *win2;
int ch;
int state, flavor[OVERLAP_FLAVORS];
- WINDOW *win1 = newwin(9, 20, 3, 3);
- WINDOW *win2 = newwin(9, 20, 9, 16);
+ if ((win1 = make_overlap(0)) == 0
+ || (win2 = make_overlap(1)) == 0)
+ return ERR;
curs_set(0);
raw();
refresh();
move(0, 0);
- printw("This test shows the behavior of wnoutrefresh() with respect to\n");
- printw("the shared region of two overlapping windows A and B. The cross\n");
- printw("pattern in each window does not overlap the other.\n");
+ printw("Test wnoutrefresh() for overlapping windows with double-cell characters:");
memset(flavor, 0, sizeof(flavor));
state = overlap_help(0, flavor);
- while (!isQuit(ch = Getchar(), TRUE))
+ while (!isQuit(ch = Getchar(), TRUE)) {
switch (ch) {
case 'a': /* refresh window A first, then B */
overlap_test_0(win1, win2);
break;
case 'c': /* fill window A so it's visible */
- overlap_test_1(flavor[1], 0, win1, 'A');
+ x_overlap_test_1(flavor[otBASE_fill], 0, win1, WIDE_A);
break;
case 'd': /* fill window B so it's visible */
- overlap_test_1(flavor[1], 1, win2, 'B');
+ x_overlap_test_1(flavor[otBASE_fill], 1, win2, WIDE_B);
break;
case 'e': /* cross test pattern in window A */
- overlap_test_2(flavor[2], 0, win1, 'A');
+ x_overlap_test_2(flavor[otBASE_draw], 0, win1, WIDE_A);
break;
case 'f': /* cross test pattern in window A */
- overlap_test_2(flavor[2], 1, win2, 'B');
+ x_overlap_test_2(flavor[otBASE_draw], 1, win2, WIDE_B);
break;
case 'g': /* clear window A */
break;
case 'i': /* overwrite A onto B */
- overlap_test_4(flavor[4], win1, win2);
+ overlap_test_4(flavor[otBASE_copy], win1, win2);
break;
case 'j': /* overwrite B onto A */
- overlap_test_4(flavor[4], win2, win1);
+ overlap_test_4(flavor[otBASE_copy], win2, win1);
break;
case CTRL('n'):
beep();
break;
}
+ }
delwin(win2);
delwin(win1);
exit_curses();
return OK;
}
+#endif /* USE_WIDEC_SUPPORT */
#endif /* HAVE_COPYWIN */
CMDS(TRUE, ONLY(form_test), 'r', "exercise form library"),
#endif
#if HAVE_COPYWIN
- CMDS(TRUE, ONLY(overlap_test), 's', "overlapping-refresh test"),
+ CMDS(TRUE, BOTH(overlap_test), 's', "overlapping-refresh test"),
#endif
#if USE_LIBMENU && defined(TRACE)
CMDS(TRUE, ONLY(trace_set), 't', "set trace level"),
--- /dev/null
+/****************************************************************************
+ * Copyright (c) 2017 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 *
+ * "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. *
+ ****************************************************************************/
+/*
+ * clone of view.c, using pads
+ *
+ * $Id: padview.c,v 1.12 2017/10/23 00:37:21 tom Exp $
+ */
+
+#include <test.priv.h>
+#include <widechars.h>
+#include <popup_msg.h>
+
+#include <sys/stat.h>
+#include <time.h>
+
+#if HAVE_NEWPAD
+
+static void finish(int sig) GCC_NORETURN;
+
+#define my_pair 1
+
+static int shift = 0;
+static bool try_color = FALSE;
+
+static char *fname;
+static int num_lines;
+
+#if USE_WIDEC_SUPPORT
+static bool n_option = FALSE;
+#endif
+
+static void usage(void) GCC_NORETURN;
+
+static void
+failed(const char *msg)
+{
+ endwin();
+ fprintf(stderr, "%s\n", msg);
+ ExitProgram(EXIT_FAILURE);
+}
+
+static void
+finish(int sig)
+{
+ endwin();
+ ExitProgram(sig != 0 ? EXIT_FAILURE : EXIT_SUCCESS);
+}
+
+static void
+show_all(const char *tag, WINDOW *my_pad, int my_row)
+{
+ int i;
+ int digits;
+ char temp[BUFSIZ];
+ time_t this_time;
+
+ for (digits = 1, i = num_lines; i > 0; i /= 10) {
+ ++digits;
+ }
+
+ wattrset(stdscr, COLOR_PAIR(my_pair));
+ clear();
+
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
+ "view %.*s", (int) strlen(tag), tag);
+ i = (int) strlen(temp);
+ _nc_SPRINTF(temp + i, _nc_SLIMIT(sizeof(temp) - i)
+ " %.*s", (int) sizeof(temp) - i - 2, fname);
+ mvprintw(0, 0, "%.*s", COLS, temp);
+ this_time = time((time_t *) 0);
+ _nc_STRNCPY(temp, ctime(&this_time), (size_t) 30);
+ if ((i = (int) strlen(temp)) != 0) {
+ temp[--i] = 0;
+ mvprintw(0, COLS - i - 2, " %s", temp);
+ }
+
+ for (i = 1; i < LINES; i++) {
+ int actual = my_row + i;
+ if (actual > num_lines) {
+ break;
+ }
+ mvprintw(i, 0, "%*d:", digits, actual);
+ }
+ wnoutrefresh(stdscr);
+ pnoutrefresh(my_pad, my_row, shift, 1, digits + 1, LINES - 1, COLS - 1);
+ doupdate();
+}
+
+static WINDOW *
+read_file(const char *filename)
+{
+ FILE *fp;
+ int pass;
+ int k;
+ int height, width;
+ size_t j;
+ size_t len;
+ struct stat sb;
+ char *my_blob;
+ char **my_vec = 0;
+ WINDOW *my_pad;
+
+ if (stat(filename, &sb) != 0
+ || (sb.st_mode & S_IFMT) != S_IFREG) {
+ failed("input is not a file");
+ }
+
+ if (sb.st_size == 0) {
+ failed("input is empty");
+ }
+
+ if ((fp = fopen(filename, "r")) == 0) {
+ failed("cannot open input-file");
+ }
+
+ if ((my_blob = malloc((size_t) sb.st_size + 1)) == 0) {
+ failed("cannot allocate memory for input-file");
+ }
+
+ len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp);
+ my_blob[sb.st_size] = '\0';
+ fclose(fp);
+
+ for (pass = 0; pass < 2; ++pass) {
+ char *base = my_blob;
+ k = 0;
+ for (j = 0; j < len; ++j) {
+ if (my_blob[j] == '\n') {
+ if (pass) {
+ my_vec[k] = base;
+ my_blob[j] = '\0';
+ }
+ base = my_blob + j + 1;
+ ++k;
+ }
+ }
+ num_lines = k;
+ if (base != (my_blob + j))
+ ++num_lines;
+ if (!pass &&
+ ((my_vec = typeCalloc(char *, (size_t) k + 2)) == 0)) {
+ failed("cannot allocate line-vector #1");
+ }
+ }
+
+#if USE_WIDEC_SUPPORT
+ if (!memcmp("\357\273\277", my_blob, 3)) {
+ char *s = my_blob + 3;
+ char *d = my_blob;
+ Trace(("trim BOM"));
+ do {
+ } while ((*d++ = *s++) != '\0');
+ }
+#endif
+
+ height = num_lines;
+ width = (int) strlen(my_vec[0]);
+ for (k = 1; my_vec[k]; ++k) {
+ int check = (int) (my_vec[k] - my_vec[k - 1]);
+ if (width < check)
+ width = check;
+ }
+ width = (width + 1) * 5;
+ my_pad = newpad(height, width);
+ if (my_pad == 0)
+ failed("cannot allocate pad workspace");
+ if (try_color) {
+ wattrset(my_pad, COLOR_PAIR(my_pair));
+ wbkgd(my_pad, (chtype) COLOR_PAIR(my_pair));
+ }
+
+ /*
+ * Use the curses library for rendering, including tab-conversion.
+ */
+ Trace(("slurp the file"));
+ for (k = 0; my_vec[k]; ++k) {
+ char *s;
+#if USE_WIDEC_SUPPORT
+ char *last = my_vec[k] + (int) strlen(my_vec[k]);
+ wchar_t wch[2];
+ size_t rc;
+#ifndef state_unused
+ mbstate_t state;
+#endif
+#endif /* USE_WIDEC_SUPPORT */
+
+ wmove(my_pad, k, 0);
+#if USE_WIDEC_SUPPORT
+ wch[1] = 0;
+ reset_mbytes(state);
+#endif
+ for (s = my_vec[k]; *s != '\0'; ++s) {
+#if USE_WIDEC_SUPPORT
+ if (!n_option) {
+ rc = (size_t) check_mbytes(wch[0], s, (size_t) (last - s), state);
+ if ((long) rc == -1 || (long) rc == -2) {
+ break;
+ }
+ s += rc - 1;
+ waddwstr(my_pad, wch);
+ } else
+#endif
+ waddch(my_pad, *s & 0xff);
+ }
+ }
+
+ free(my_vec);
+ free(my_blob);
+
+ return my_pad;
+}
+
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: view [options] file"
+ ,""
+ ,"Options:"
+ ," -c use color if terminal supports it"
+ ," -i ignore INT, QUIT, TERM signals"
+#if USE_WIDEC_SUPPORT
+ ," -n use waddch (bytes) rather then wadd_wch (wide-chars)"
+#endif
+ ," -s start in single-step mode, waiting for input"
+#ifdef TRACE
+ ," -t trace screen updates"
+ ," -T NUM specify trace mask"
+#endif
+ };
+ size_t n;
+ for (n = 0; n < SIZEOF(msg); n++)
+ fprintf(stderr, "%s\n", msg[n]);
+ ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+ static const char *help[] =
+ {
+ "Commands:",
+ " q,^Q,ESC - quit this program",
+ "",
+ " p,<Up> - scroll the viewport up by one row",
+ " n,<Down> - scroll the viewport down by one row",
+ " l,<Left> - scroll the viewport left by one column",
+ " r,<Right> - scroll the viewport right by one column",
+ " <,> - scroll the viewport left/right by 8 columns",
+ "",
+ " h,<Home> - scroll the viewport to top of file",
+ " ^F,<PageDn> - scroll to the next page",
+ " ^B,<PageUp> - scroll to the previous page",
+ " e,<End> - scroll the viewport to end of file",
+ "",
+ " ^L - repaint using redrawwin()",
+ "",
+ " 0 through 9 - enter digits for count",
+ " s - use entered count for halfdelay() parameter",
+ " - if no entered count, stop nodelay()",
+ " <space> - begin nodelay()",
+ 0
+ };
+
+ int i;
+ int my_delay = 0;
+ WINDOW *my_pad;
+ int my_row = 0;
+ int value = 0;
+ bool done = FALSE;
+ bool got_number = FALSE;
+ bool ignore_sigs = FALSE;
+ bool single_step = FALSE;
+ const char *my_label = "Input";
+
+ setlocale(LC_ALL, "");
+
+ while ((i = getopt(argc, argv, "cinstT:")) != -1) {
+ switch (i) {
+ case 'c':
+ try_color = TRUE;
+ break;
+ case 'i':
+ ignore_sigs = TRUE;
+ break;
+#if USE_WIDEC_SUPPORT
+ case 'n':
+ n_option = TRUE;
+ break;
+#endif
+ case 's':
+ single_step = TRUE;
+ break;
+#ifdef TRACE
+ case 'T':
+ {
+ char *next = 0;
+ int tvalue = (int) strtol(optarg, &next, 0);
+ if (tvalue < 0 || (next != 0 && *next != 0))
+ usage();
+ trace((unsigned) tvalue);
+ }
+ break;
+ case 't':
+ trace(TRACE_CALLS);
+ break;
+#endif
+ default:
+ usage();
+ }
+ }
+ if (optind + 1 != argc)
+ usage();
+
+ InitAndCatch(initscr(), ignore_sigs ? SIG_IGN : finish);
+ keypad(stdscr, TRUE); /* enable keyboard mapping */
+ (void) nonl(); /* tell curses not to do NL->CR/NL on output */
+ (void) cbreak(); /* take input chars one at a time, no wait for \n */
+ (void) noecho(); /* don't echo input */
+ if (!single_step)
+ nodelay(stdscr, TRUE);
+ idlok(stdscr, TRUE); /* allow use of insert/delete line */
+
+ my_pad = read_file(fname = argv[optind]);
+
+ if (try_color) {
+ if (has_colors()) {
+ start_color();
+ init_pair(my_pair, COLOR_WHITE, COLOR_BLUE);
+ bkgd((chtype) COLOR_PAIR(my_pair));
+ } else {
+ try_color = FALSE;
+ }
+ }
+
+ my_row = 0;
+ while (!done) {
+ int n, c;
+
+ if (!got_number)
+ show_all(my_label, my_pad, my_row);
+
+ for (;;) {
+ c = getch();
+ if ((c < 127) && isdigit(c)) {
+ if (!got_number) {
+ MvPrintw(0, 0, "Count: ");
+ clrtoeol();
+ }
+ addch(UChar(c));
+ value = 10 * value + (c - '0');
+ got_number = TRUE;
+ } else
+ break;
+ }
+ if (got_number && value) {
+ n = value;
+ } else {
+ n = 1;
+ }
+
+ if (c != ERR)
+ my_label = keyname(c);
+ switch (c) {
+ case KEY_DOWN:
+ case 'n':
+ for (i = 0; i < n; i++)
+ if (my_row < (num_lines - LINES + 1))
+ my_row++;
+ else
+ break;
+ break;
+
+ case KEY_UP:
+ case 'p':
+ for (i = 0; i < n; i++)
+ if (my_row > 0)
+ my_row--;
+ else
+ break;
+ break;
+
+ case 'h':
+ /* FALLTHRU */
+ case KEY_HOME:
+ my_row = 0;
+ break;
+
+ case '<':
+ if ((shift -= 8) < 0)
+ shift = 0;
+ break;
+ case '>':
+ shift += 8;
+ break;
+
+ case 'e':
+ /* FALLTHRU */
+ case KEY_END:
+ if (num_lines > LINES)
+ my_row = (num_lines - LINES + 1);
+ else
+ my_row = (num_lines - 2);
+ break;
+
+ case CTRL('F'):
+ /* FALLTHRU */
+ case KEY_NPAGE:
+ for (i = 0; i < n; i++) {
+ if (my_row < (num_lines - 5))
+ my_row += (LINES - 1);
+ else
+ my_row = (num_lines - 2);
+ }
+ break;
+
+ case CTRL('B'):
+ /* FALLTHRU */
+ case KEY_PPAGE:
+ for (i = 0; i < n; i++) {
+ if (my_row >= LINES)
+ my_row -= (LINES - 1);
+ else
+ my_row = 0;
+ }
+ break;
+
+ case 'r':
+ case KEY_RIGHT:
+ shift += n;
+ break;
+
+ case 'l':
+ case KEY_LEFT:
+ shift -= n;
+ if (shift < 0) {
+ shift = 0;
+ beep();
+ }
+ break;
+
+ case 'q':
+ case QUIT:
+ case ESCAPE:
+ done = TRUE;
+ break;
+
+#ifdef KEY_RESIZE
+ case KEY_RESIZE: /* ignore this; ncurses will repaint */
+ break;
+#endif
+ case 's':
+#if HAVE_HALFDELAY
+ if (got_number) {
+ halfdelay(my_delay = n);
+ } else {
+ nodelay(stdscr, FALSE);
+ my_delay = -1;
+ }
+#else
+ nodelay(stdscr, FALSE);
+ my_delay = -1;
+#endif
+ break;
+ case ' ':
+ nodelay(stdscr, TRUE);
+ my_delay = 0;
+ break;
+ case CTRL('L'):
+ redrawwin(stdscr);
+ break;
+ case ERR:
+ if (!my_delay)
+ napms(50);
+ break;
+ case HELP_KEY_1:
+ popup_msg(stdscr, help);
+ break;
+ default:
+ beep();
+ break;
+ }
+ if (c >= KEY_MIN || (c > 0 && !isdigit(c))) {
+ got_number = FALSE;
+ value = 0;
+ }
+ }
+
+ finish(0); /* we're done */
+}
+#else
+int
+main(void)
+{
+ printf("This program requires the curses pad functions\n");
+ ExitProgram(EXIT_FAILURE);
+}
+#endif
-# $Id: programs,v 1.40 2017/10/11 08:08:41 tom Exp $
+# $Id: programs,v 1.41 2017/10/22 16:06:57 tom Exp $
##############################################################################
# Copyright (c) 2006-2016,2017 Free Software Foundation, Inc. #
# #
lrtest $(LDFLAGS_CURSES) $(LOCAL_LIBS) lrtest
movewindow $(LDFLAGS_CURSES) $(LOCAL_LIBS) movewindow popup_msg
ncurses $(LDFLAGS_DEFAULT) $(LOCAL_LIBS) ncurses
+padview $(LDFLAGS_CURSES) $(LOCAL_LIBS) padview popup_msg
picsmap $(LDFLAGS_CURSES) $(LOCAL_LIBS) picsmap
newdemo $(LDFLAGS_CURSES) $(LOCAL_LIBS) newdemo
railroad $(LDFLAGS_TINFO) $(LOCAL_LIBS) railroad
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.129 2017/10/22 00:49:23 tom Exp $
+ * $Id: view.c,v 1.135 2017/10/23 09:18:01 tom Exp $
*/
#include <test.priv.h>
#include <sys/stat.h>
#include <time.h>
-#undef CTRL /* conflict on AIX 5.2 with <sys/ioctl.h> */
-
static void finish(int sig) GCC_NORETURN;
#define my_pair 1
-#undef CTRL
-#define CTRL(x) ((x) & 0x1f)
-
static int shift = 0;
static bool try_color = FALSE;
show_all(const char *tag)
{
int i;
+ int digits;
char temp[BUFSIZ];
NCURSES_CH_T *s;
time_t this_time;
+ for (digits = 1, i = num_lines; i > 0; i /= 10) {
+ ++digits;
+ }
+
_nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
"view %.*s", (int) strlen(tag), tag);
i = (int) strlen(temp);
break;
}
move(i, 0);
- printw("%3d:", actual);
+ printw("%*d:", digits, actual);
clrtoeol();
if ((s = lptr[i - 1]) == 0) {
continue;
}
#if USE_WIDEC_SUPPORT
- if (!memcmp("", my_blob, 3)) {
+ if (!memcmp("\357\273\277", my_blob, 3)) {
char *s = my_blob + 3;
char *d = my_blob;
Trace(("trim BOM"));
if (y)
x = width - 1;
wmove(my_win, 0, 0);
- if ((vec_lines[k] = typeCalloc(NCURSES_CH_T, (size_t) x + 1)) == 0)
+ /* "x + 1" works with standard curses; some implementations are buggy */
+ if ((vec_lines[k] = typeCalloc(NCURSES_CH_T, x + width + 1)) == 0)
failed("cannot allocate line-vector #3");
#if USE_WIDEC_SUPPORT
win_wchnstr(my_win, vec_lines[k], x);
" n,<Down> - scroll the viewport down by one row",
" l,<Left> - scroll the viewport left by one column",
" r,<Right> - scroll the viewport right by one column",
+ " <,> - scroll the viewport left/right by 8 columns",
"",
" h,<Home> - scroll the viewport to top of file",
" ^F,<PageDn> - scroll to the next page",
setlocale(LC_ALL, "");
- while ((i = getopt(argc, argv, "cirstT:")) != -1) {
+ while ((i = getopt(argc, argv, "cinstT:")) != -1) {
switch (i) {
case 'c':
try_color = TRUE;
case 'i':
ignore_sigs = TRUE;
break;
+#if USE_WIDEC_SUPPORT
+ case 'n':
+ n_option = TRUE;
+ break;
+#endif
case 's':
single_step = TRUE;
break;
scrl((int) (lptr - olptr));
break;
- case '<':
- shift = 0;
- /* FALLTHRU */
case 'h':
/* FALLTHRU */
case KEY_HOME:
lptr = vec_lines;
break;
+ case '<':
+ if ((shift -= 8) < 0)
+ shift = 0;
+ break;
case '>':
- shift = 0;
- /* FALLTHRU */
+ shift += 8;
+ break;
+
case 'e':
/* FALLTHRU */
case KEY_END: