diff --git a/MANIFEST b/MANIFEST index bc547fac..bcc0bcf1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -464,6 +464,7 @@ ./doc/html/man/mitem_visible.3x.html ./doc/html/man/ncurses.3x.html ./doc/html/man/ncurses6-config.1.html +./doc/html/man/new_pair.3x.html ./doc/html/man/panel.3x.html ./doc/html/man/resizeterm.3x.html ./doc/html/man/tabs.1.html diff --git a/NEWS b/NEWS index dba8fd13..ef4cabd2 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.2772 2017/03/11 23:29:01 tom Exp $ +-- $Id: NEWS,v 1.2779 2017/03/18 19:17:44 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,19 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20170318 + + change TERMINAL structure in term.h to make it opaque. Some + applications misuse its members, e.g., directly modifying it + rather than using def_prog_mode(). + + modify utility headers such as tic.h to make it clearer which are + externals that are used by tack. + + improve curs_slk.3x in particular its discussion of portability. + + fix cut/paste in legacy_encoding.3x + + add prototype for find_pair() to new_pair.3x (report by Branden + Robinson). + + fix a couple of broken links in generated man-html documentation. + + regenerate man-html documentation. + 20170311 + modify vt100 rs2 string to reset vt52 mode and scrolling regions (report/analysis by Robert King) -TD diff --git a/VERSION b/VERSION index a1d35f56..977c7749 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20170311 +5:0:9 6.0 20170318 diff --git a/dist.mk b/dist.mk index 64022e85..cbf01923 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1151 2017/03/05 19:24:08 tom Exp $ +# $Id: dist.mk,v 1.1152 2017/03/12 09:25:40 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 0 -NCURSES_PATCH = 20170311 +NCURSES_PATCH = 20170318 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index e92fba9a..89ef2934 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -40,7 +40,7 @@
-ADACURSES(1) User Commands ADACURSES(1) +ADACURSES(1) User Commands ADACURSES(1) @@ -131,11 +131,11 @@
curses(3x)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
- ADACURSES(1)
+ ADACURSES(1)
infocmp(1m), curses(3x), terminfo(5)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html index 6cab236a..4de38847 100644 --- a/doc/html/man/clear.1.html +++ b/doc/html/man/clear.1.html @@ -147,7 +147,7 @@
tput(1), terminfo(5)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html
index cf446d17..843ada75 100644
--- a/doc/html/man/curs_color.3x.html
+++ b/doc/html/man/curs_color.3x.html
@@ -26,7 +26,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_color.3x,v 1.46 2017/01/07 19:57:48 tom Exp @
+ * @Id: curs_color.3x,v 1.47 2017/03/13 21:49:37 tom Exp @
* .br
* .br
* .br
@@ -49,8 +49,8 @@
- start_color, init_pair, init_color, has_colors,
- can_change_color, color_content, pair_content, COLOR_PAIR,
+ start_color, init_pair, init_color, color_content,
+ pair_content, has_colors, can_change_color, COLOR_PAIR,
PAIR_NUMBER - curses color manipulation routines
@@ -58,16 +58,17 @@
#include <curses.h>
int start_color(void);
+
int init_pair(short pair, short f, short b);
int init_color(short color, short r, short g, short b);
- bool has_colors(void);
- bool can_change_color(void);
-
int color_content(short color, short *r, short *g, short
*b);
int pair_content(short pair, short *f, short *b);
+ bool has_colors(void);
+ bool can_change_color(void);
+
int COLOR_PAIR(int n);
PAIR_NUMBER(attrs);
diff --git a/doc/html/man/curs_slk.3x.html b/doc/html/man/curs_slk.3x.html
index bb6758c1..40efdb9f 100644
--- a/doc/html/man/curs_slk.3x.html
+++ b/doc/html/man/curs_slk.3x.html
@@ -1,6 +1,6 @@
@@ -57,23 +57,29 @@
#include <curses.h>
int slk_init(int fmt);
+
int slk_set(int labnum, const char *label, int fmt);
+ int slk_wset(int labnum, const wchar_t *label, int fmt);
+
+ char *slk_label(int labnum);
+
int slk_refresh(void);
int slk_noutrefresh(void);
- char *slk_label(int labnum);
int slk_clear(void);
int slk_restore(void);
int slk_touch(void);
+
int slk_attron(const chtype attrs);
int slk_attroff(const chtype attrs);
int slk_attrset(const chtype attrs);
int slk_attr_on(attr_t attrs, void* opts);
int slk_attr_off(const attr_t attrs, void * opts);
- int slk_attr_set(const attr_t attrs, short color_pair,
- void* opts);
+ int slk_attr_set(const attr_t attrs, short pair, void*
+ opts);
+
attr_t slk_attr(void);
- int slk_color(short color_pair);
- int slk_wset(int labnum, const wchar_t *label, int fmt);
+
+ int slk_color(short pair);
@@ -85,50 +91,54 @@
eight characters each. In addition to this, the ncurses
implementation supports a mode where it simulates 12 la-
bels of up to five characters each. This is useful for
- today's PC-like enduser devices. ncurses simulates this
- mode by taking over up to two lines at the bottom of the
- screen; it does not try to use any hardware support for
- this mode.
+ PC-like enduser devices. ncurses simulates this mode by
+ taking over up to two lines at the bottom of the screen;
+ it does not try to use any hardware support for this mode.
- The slk_init routine must be called before initscr or
+
+
+ The slk_init routine must be called before initscr or
newterm is called. If initscr eventually uses a line from
stdscr to emulate the soft labels, then fmt determines how
the labels are arranged on the screen:
- 0 indicates a 3-2-3 arrangement of the labels.
+ 0 indicates a 3-2-3 arrangement of the labels.
- 1 indicates a 4-4 arrangement
+ 1 indicates a 4-4 arrangement
- 2 indicates the PC-like 4-4-4 mode.
+ 2 indicates the PC-like 4-4-4 mode.
- 3 is again the PC-like 4-4-4 mode, but in addition
- an index line is generated, helping the user to
- identify the key numbers easily.
+ 3 is again the PC-like 4-4-4 mode, but in addition an
+ index line is generated, helping the user to identi-
+ fy the key numbers easily.
- The slk_set routine (and the slk_wset routine for the
+
+
+ The slk_set routine (and the slk_wset routine for the
wide-character library) has three parameters:
- labnum
- is the label number, from 1 to 8 (12 for fmt
- in slk_init is 2 or 3);
+ labnum
+ is the label number, from 1 to 8 (12 for fmt in
+ slk_init is 2 or 3);
- label
- is be the string to put on the label, up to
- eight (five for fmt in slk_init is 2 or 3)
- characters in length. A null string or a null
- pointer sets up a blank label.
+ label
+ is be the string to put on the label, up to eight
+ (five for fmt in slk_init is 2 or 3) characters in
+ length. A null string or a null pointer sets up a
+ blank label.
- fmt is either 0, 1, or 2, indicating whether the
- label is to be left-justified, centered, or
- right-justified, respectively, within the la-
- bel.
+ fmt is either 0, 1, or 2, indicating whether the label
+ is to be left-justified, centered, or right-justi-
+ fied, respectively, within the label.
+ The slk_label routine returns the current label for label
+ number labnum, with leading and trailing blanks stripped.
+
+
+
The slk_refresh and slk_noutrefresh routines correspond to
the wrefresh and wnoutrefresh routines.
- The slk_label routine returns the current label for label
- number labnum, with leading and trailing blanks stripped.
-
The slk_clear routine clears the soft labels from the
screen.
@@ -138,6 +148,8 @@
The slk_touch routine forces all the soft labels to be
output the next time a slk_noutrefresh is performed.
+
+
The slk_attron, slk_attrset, slk_attroff and slk_attr rou-
tines correspond to attron, attrset, attroff and attr_get.
They have an effect only if soft labels are simulated on
@@ -145,6 +157,8 @@
soft keys is A_STANDOUT (as in System V curses, which does
not document this fact).
+
+
The slk_color routine corresponds to color_set. It has an
effect only if soft labels are simulated on the bottom
line of the screen.
@@ -158,43 +172,41 @@
X/Open defines no error conditions. In this implementa-
tion
- slk_attr
- returns the attribute used for the soft keys.
+ slk_attr
+ returns the attribute used for the soft keys.
- slk_attroff, slk_attron, slk_clear,
- slk_noutrefresh, slk_refresh, slk_touch
- return an error if the terminal or the soft-
- keys were not initialized.
+ slk_attroff, slk_attron, slk_clear, slk_noutrefresh,
+ slk_refresh, slk_touch
+ return an error if the terminal or the softkeys
+ were not initialized.
- slk_attrset
- returns an error if the terminal or the soft-
- keys were not initialized.
+ slk_attrset
+ returns an error if the terminal or the softkeys
+ were not initialized.
- slk_attr_set
- returns an error if the terminal or the soft-
- keys were not initialized, or the color pair
- is outside the range 0..COLOR_PAIRS-1, or opts
- is not null.
+ slk_attr_set
+ returns an error if the terminal or the softkeys
+ were not initialized, or the color pair is outside
+ the range 0..COLOR_PAIRS-1, or opts is not null.
- slk_color
- returns an error if the terminal or the soft-
- keys were not initialized, or the color pair
- is outside the range 0..COLOR_PAIRS-1.
+ slk_color
+ returns an error if the terminal or the softkeys
+ were not initialized, or the color pair is outside
+ the range 0..COLOR_PAIRS-1.
- slk_init
- returns an error if the format parameter is
- outside the range 0..3.
+ slk_init
+ returns an error if the format parameter is out-
+ side the range 0..3.
- slk_label
- returns NULL on error.
+ slk_label
+ returns NULL on error.
- slk_set
- returns an error if the terminal or the soft-
- keys were not initialized, or the labnum pa-
- rameter is outside the range of label counts,
- or if the format parameter is outside the
- range 0..2, or if memory for the labels cannot
- be allocated.
+ slk_set
+ returns an error if the terminal or the softkeys
+ were not initialized, or the labnum parameter is
+ outside the range of label counts, or if the for-
+ mat parameter is outside the range 0..2, or if
+ memory for the labels cannot be allocated.
@@ -203,12 +215,24 @@
- The XSI Curses standard, Issue 4, describes these func- - tions. It changes the argument type of the attribute-ma- - nipulation functions slk_attron, slk_attroff, slk_attrset - to be attr_t, and adds const qualifiers. The format codes - 2 and 3 for slk_init and the function slk_attr are specif- - ic to ncurses. + The XSI Curses standard, Issue 4, described the soft-key + functions, with some differences from SVr4 curses: + + o It added functions like the SVr4 the attribute-manipu- + lation functions slk_attron, slk_attroff, slk_attrset + which use attr_t parameters, along with a reserved + opts parameter. + + One of these new functions (slk_attr_set) also has a + color-pair parameter. + + o It added const qualifiers to parameters (unnecessari- + ly), and + + o It added slk_color. + + The format codes 2 and 3 for slk_init and the function + slk_attr are specific to ncurses.
@@ -223,7 +247,15 @@
diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html index afa4ec1a..44c2cfdf 100644 --- a/doc/html/man/infotocap.1m.html +++ b/doc/html/man/infotocap.1m.html @@ -88,7 +88,7 @@
curses(3x), tic(1m), infocmp(1m), terminfo(5)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/legacy_coding.3x.html b/doc/html/man/legacy_coding.3x.html index b721536b..d8792bfa 100644 --- a/doc/html/man/legacy_coding.3x.html +++ b/doc/html/man/legacy_coding.3x.html @@ -1,6 +1,6 @@ @@ -47,7 +47,7 @@
- use_legacy_coding - use terminal's default colors + use_legacy_coding - override locale-encoding checks
diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index 1c07f627..584361d6 100644
--- a/doc/html/man/menu.3x.html
+++ b/doc/html/man/menu.3x.html
@@ -217,7 +217,7 @@
curses(3x) and related pages whose names begin "menu_" for
detailed descriptions of the entry points.
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index d280efe5..07fee579 100644
--- a/doc/html/man/ncurses.3x.html
+++ b/doc/html/man/ncurses.3x.html
@@ -27,7 +27,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: ncurses.3x,v 1.129 2017/02/18 16:50:46 tom Exp @
+ * @Id: ncurses.3x,v 1.130 2017/03/09 10:21:11 tom Exp @
-->
@@ -60,7 +60,7 @@
sonable optimization. This implementation is "new curses"
(ncurses) and is the approved replacement for 4.4BSD clas-
sic curses, which has been discontinued. This describes
- ncurses version 6.0 (patch 20170304).
+ ncurses version 6.0 (patch 20170318).
The ncurses library emulates the curses library of System
V Release 4 UNIX, and XPG4 (X/Open Portability Guide)
@@ -324,6 +324,7 @@
addnwstr curs_addwstr(3x)
addstr curs_addstr(3x)
addwstr curs_addwstr(3x)
+ alloc_pair new_pair(3x)*
assume_default_colors default_colors(3x)*
attr_get curs_attr(3x)
attr_off curs_attr(3x)
@@ -374,11 +375,13 @@
erasechar curs_termattrs(3x)
erasewchar curs_termattrs(3x)
filter curs_util(3x)
+ find_pair new_pair(3x)*
flash curs_beep(3x)
flushinp curs_util(3x)
+
+ free_pair new_pair(3x)*
get_wch curs_get_wch(3x)
get_wstr curs_get_wstr(3x)
-
getattrs curs_attr(3x)
getbegx curs_legacy(3x)*
getbegy curs_legacy(3x)*
@@ -441,10 +444,10 @@
is_keypad curs_opaque(3x)*
is_leaveok curs_opaque(3x)*
is_linetouched curs_touch(3x)
+
is_nodelay curs_opaque(3x)*
is_notimeout curs_opaque(3x)*
is_pad curs_opaque(3x)*
-
is_scrollok curs_opaque(3x)*
is_subwin curs_opaque(3x)*
is_syncok curs_opaque(3x)*
@@ -507,10 +510,10 @@
mvinwstr curs_inwstr(3x)
mvprintw curs_printw(3x)
mvscanw curs_scanw(3x)
+
mvvline curs_border(3x)
mvvline_set curs_border_set(3x)
mvwadd_wch curs_add_wch(3x)
-
mvwadd_wchnstr curs_add_wchstr(3x)
mvwadd_wchstr curs_add_wchstr(3x)
mvwaddch curs_addch(3x)
@@ -573,10 +576,10 @@
printw curs_printw(3x)
putp curs_terminfo(3x)
putwin curs_util(3x)
+
qiflush curs_inopts(3x)
raw curs_inopts(3x)
redrawwin curs_refresh(3x)
-
refresh curs_refresh(3x)
reset_prog_mode curs_kernel(3x)
reset_shell_mode curs_kernel(3x)
@@ -639,10 +642,10 @@
touchline curs_touch(3x)
touchwin curs_touch(3x)
tparm curs_terminfo(3x)
+
tputs curs_termcap(3x)
tputs curs_terminfo(3x)
trace curs_trace(3x)*
-
typeahead curs_inopts(3x)
unctrl curs_util(3x)
unget_wch curs_get_wch(3x)
@@ -705,10 +708,10 @@
wgetch curs_getch(3x)
wgetdelay curs_opaque(3x)*
wgetn_wstr curs_get_wstr(3x)
+
wgetnstr curs_getstr(3x)
wgetparent curs_opaque(3x)*
wgetscrreg curs_opaque(3x)*
-
wgetstr curs_getstr(3x)
whline curs_border(3x)
whline_set curs_border_set(3x)
diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
index 51adb9ab..132455f1 100644
--- a/doc/html/man/ncurses6-config.1.html
+++ b/doc/html/man/ncurses6-config.1.html
@@ -114,7 +114,7 @@
curses(3x)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/new_pair.3x.html b/doc/html/man/new_pair.3x.html
new file mode 100644
index 00000000..fa487adc
--- /dev/null
+++ b/doc/html/man/new_pair.3x.html
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+new_pair 3x
+
+
+
+
+new_pair 3x
+
+new_pair(3x) new_pair(3x)
+
+
+
+
+
NAME
+ alloc_pair, find_pair, free_pair - new curses color-pair
+ functions
+
+
+
SYNOPSIS
+ #include <curses.h>
+
+ int alloc_pair(int fg, int bg);
+ int find_pair(int fg, int bg);
+ int free_pair(int pair);
+
+
+
DESCRIPTION
+ These functions are an extension to the curses library.
+ They permit an application to dynamically allocate a color
+ pair using the foreground/background colors rather than
+ assign a fixed color pair number, and return an unused
+ pair to the pool.
+
+ The number of colors may be related to the number of pos-
+ sible color pairs for a given terminal, or it may not:
+
+ o While almost all terminals allow setting the color
+ attributes independently, it is unlikely that your
+ terminal allows you to modify the attributes of a
+ given character cell without rewriting it. That is,
+ the foreground and background colors are applied as a
+ pair.
+
+ o Color pairs are the curses library's way of managing a
+ color palette on a terminal. If the library does not
+ keep track of the combinations of colors which are
+ displayed, it will be inefficient.
+
+ o For simple terminal emulators with only a few dozen
+ color combinations, it is convenient to use the maxi-
+ mum number of combinations as the limit on color
+ pairs:
+
+ COLORS * COLORS
+
+ o Terminals which support default colors distinct from
+ "ANSI colors" add to the possible combinations, pro-
+ ducing this total:
+
+ ( COLORS + 1 ) * ( COLORS + 1 )
+
+ o An application might use up to a few dozen color pairs
+ to implement a predefined color scheme.
+
+ Beyond that lies in the realm of programs using the
+ foreground and background colors for "ASCII art" (or
+ some other non-textual application).
+
+ Also beyond those few dozen pairs, the required size
+ for a table to represent the combinations grows
+ rapidly with an increasing number of colors.
+
+ These functions allow a developer to let the screen
+ library manage color pairs.
+
+
+
alloc_pair
+ The alloc_pair function accepts parameters for foreground
+ and background color, and checks if that color combination
+ is already associated with a color pair.
+
+ o If the combination already exists, alloc_pair returns
+ the existing pair.
+
+ o If the combination does not exist, alloc_pair allo-
+ cates a new color pair and returns that.
+
+ o If the table fills up, alloc_pair discards the least-
+ recently allocated entry using free_pair and allocates
+ a new color pair.
+
+ All of the color pairs are allocated from a table of pos-
+ sible color pairs. The size of the table is determined by
+ the terminfo pairs capability. The table is shared with
+ init_pair; in fact alloc_pair calls init_pair after updat-
+ ing the ncurses library's fast index to the colors versus
+ color pairs.
+
+
+
find_pair
+ The find_pair function accepts parameters for foreground
+ and background color, and checks if that color combination
+ is already associated with a color pair, returning the
+ pair number if it has been allocated. Otherwise it
+ returns -1.
+
+
+
free_pair
+ Marks the given color pair as unused, i.e., like color
+ pair 0.
+
+
+
RETURN VALUE
+ The alloc_pair function returns a color pair number in the
+ range 1 through COLOR_PAIRS-1, unless it encounters an
+ error updating its fast index to the color pair values,
+ preventing it from allocating a color pair. In that case,
+ it returns -1.
+
+ The find_pair function returns a color pair number if the
+ given color combination has been associated with a color
+ pair, or -1 if not.
+
+ Likewise, free_pair returns OK unless it encounters an
+ error updating the fast index or if no such color pair is
+ in use.
+
+
+
PORTABILITY
+ These routines are specific to ncurses. They were not
+ supported on Version 7, BSD or System V implementations.
+ It is recommended that any code depending on them be con-
+ ditioned using NCURSES_VERSION.
+
+
+
SEE ALSO
+ init_pair(3x).
+
+
+
AUTHOR
+ Thomas Dickey.
+
+
+
+ new_pair(3x)
+
+
+
+- NAME
+- SYNOPSIS
+- DESCRIPTION
+
+- alloc_pair
+- find_pair
+- free_pair
+
+
+- RETURN VALUE
+- PORTABILITY
+- SEE ALSO
+- AUTHOR
+
+
+
+
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index 80cc830f..da1bb8da 100644
--- a/doc/html/man/panel.3x.html
+++ b/doc/html/man/panel.3x.html
@@ -208,7 +208,7 @@
curses(3x), curs_variables(3x),
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html index f86713d0..dc08e966 100644 --- a/doc/html/man/tabs.1.html +++ b/doc/html/man/tabs.1.html @@ -170,7 +170,7 @@
tset(1), infocmp(1m), curses(3x), terminfo(5).
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 7ce1a222..a5f900a1 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -31,7 +31,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: terminfo.head,v 1.30 2017/03/05 00:24:35 tom Exp @
+ * @Id: terminfo.head,v 1.31 2017/03/06 09:58:14 tom Exp @
* Head of terminfo man page ends here
* @Id: terminfo.tail,v 1.78 2017/03/04 23:52:35 tom Exp @
* Beginning of terminfo.tail file
@@ -75,7 +75,7 @@
nals by giving a set of capabilities which they have, by
specifying how to perform screen operations, and by speci-
fying padding requirements and initialization sequences.
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
@@ -93,7 +93,7 @@
be used for formatting entries for readability. These
are removed from parsed entries.
- The infocmp -f and -W options relies on this to format
+ The infocmp -f and -W options rely on this to format
if-then-else expressions, or to enforce maximum line-
width. The resulting formatted terminal description
can be read by tic.
@@ -105,7 +105,7 @@
The first name given is the most common abbreviation
for the terminal (its primary name), the last name
given should be a long name fully identifying the ter-
- minal (see longname(3x)), and all others are treated
+ minal (see longname(3x)), and all others are treated
as synonyms (aliases) for the primary terminal name.
X/Open Curses advises that all names but the last
diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 03f4c6e6..f25e2442 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -403,7 +403,7 @@
infocmp(1m), captoinfo(1m), infotocap(1m), toe(1m),
curses(3x), term(5). terminfo(5).
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index 2100f4ca..bcb2f5d8 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -120,7 +120,7 @@
tic(1m), infocmp(1m), captoinfo(1m), infotocap(1m),
curses(3x), terminfo(5).
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index 588b32a9..ae2ccc70 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -530,7 +530,7 @@
clear(1), stty(1), tabs(1), tset(1), terminfo(5),
curs_termcap(3x).
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index 45dc271b..ccf46a1f 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -435,7 +435,7 @@
csh(1), sh(1), stty(1), curs_terminfo(3x), tty(4),
terminfo(5), ttys(5), environ(7)
- This describes ncurses version 6.0 (patch 20170304).
+ This describes ncurses version 6.0 (patch 20170318).
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index 587ee521..a030c251 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -1,7 +1,7 @@
# vile:awkmode
BEGIN {
print "/****************************************************************************"
- print " * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *"
+ print " * Copyright (c) 1998-2013,2017 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
print " * copy of this software and associated documentation files (the *"
@@ -34,7 +34,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.62 2013/08/17 19:21:56 tom Exp $ */"
+ print "/* $Id: MKterm.h.awk.in,v 1.65 2017/03/18 20:05:53 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@@ -124,7 +124,8 @@ BEGIN {
print ""
print "#define NAMESIZE 256"
print ""
- print "#define CUR cur_term->type."
+ print "/* The cast works because TERMTYPE is the first data in TERMINAL */"
+ print "#define CUR ((TERMTYPE *)(cur_term))->"
print ""
}
@@ -194,14 +195,24 @@ END {
print ""
print "} TERMTYPE;"
print ""
+ print "/*"
+ print " * The only reason these structures are visible is for read-only use."
+ print " * Programs which modify the data are not, never were, portable across"
+ print " * curses implementations."
+ print " */"
+ print "#ifdef NCURSES_INTERNALS"
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
print " short Filedes; /* file description being written to */"
- print " TTY Ottyb, /* original state of the terminal */"
- print " Nttyb; /* current state of the terminal */"
+ print " TTY Ottyb; /* original state of the terminal */"
+ print " TTY Nttyb; /* current state of the terminal */"
print " int _baudrate; /* used to compute padding */"
- print " char * _termname; /* used for termname() */"
+ print " char * _termname; /* used for termname() */"
print "} TERMINAL;"
+ print "#else"
+ print "typedef struct term TERMINAL;"
+ print "#endif /* NCURSES_INTERNALS */"
+ print ""
print ""
print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
@@ -247,18 +258,28 @@ END {
print ""
print "#endif"
print ""
- print "/* internals */"
+ print "/*"
+ print " * These entrypoints are used only by the ncurses utilities such as tic."
+ print " */"
+ print "#ifdef NCURSES_INTERNALS"
+ print ""
print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
- print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);"
- print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);"
print "extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int);"
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
- print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print ""
- print "/* entry points */"
+ print "#endif /* NCURSES_INTERNALS */"
+ print ""
+ print ""
+ print "/*"
+ print " * These entrypoints are used by tack."
+ print " */"
+ print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
+ print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
+ print ""
+ print "/* Normal entry points */"
print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
print ""
diff --git a/include/term_entry.h b/include/term_entry.h
index 0223f400..b47d9158 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,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 *
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
-/* $Id: term_entry.h,v 1.47 2015/08/30 00:41:20 tom Exp $ */
+/* $Id: term_entry.h,v 1.49 2017/03/18 18:52:12 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@@ -141,6 +141,11 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
_nc_warning(#p " but no " #q); \
}
+/*
+ * These entrypoints are used only by the ncurses utilities such as tic.
+ */
+#ifdef NCURSES_INTERNALS
+
/* alloc_entry.c: elementary allocation code */
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
@@ -150,13 +155,6 @@ extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
/* alloc_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *);
-extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
-
-/* free_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
-
-/* lib_acs.c */
-extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
/* lib_termcap.c: trim sgr0 string for termcap users */
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE *);
@@ -185,6 +183,22 @@ extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool);
/* trace_xnames.c */
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
+
+#endif /* NCURSES_INTERNALS */
+
+/*
+ * These entrypoints are used by tack.
+ */
+
+/* alloc_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
+
+/* lib_acs.c */
+extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
+
+/* free_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
+
/* *INDENT-ON* */
#ifdef __cplusplus
diff --git a/include/tic.h b/include/tic.h
index fb713afd..126515ea 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -33,9 +33,8 @@
****************************************************************************/
/*
- * $Id: tic.h,v 1.70 2017/02/04 01:48:53 tom Exp $
- * tic.h - Global variables and structures for the terminfo
- * compiler.
+ * $Id: tic.h,v 1.73 2017/03/18 17:14:19 tom Exp $
+ * tic.h - Global variables and structures for the terminfo compiler.
*/
#ifndef __TIC_H
@@ -129,11 +128,6 @@ extern "C" {
#define DEBUG(n, a) /*nothing*/
#endif
-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
-extern NCURSES_EXPORT(void) _nc_tracef (char *, ...) GCC_PRINTFLIKE(1,2);
-extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
-extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
-
/*
* These are the types of tokens returned by the scanner. The first
* three are also used in the hash table of capability names. The scanner
@@ -150,49 +144,33 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
#define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */
- /*
- * The global structure in which the specific parts of a
- * scanned token are returned.
- *
- */
+/*
+ * The global structure in which the specific parts of a
+ * scanned token are returned.
+ */
struct token
{
- char *tk_name; /* name of capability */
+ char *tk_name; /* name of capability */
int tk_valnumber; /* value of capability (if a number) */
char *tk_valstring; /* value of capability (if a string) */
};
-extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
-
- /*
- * Offsets to string capabilities, with the corresponding functionkey
- * codes.
- */
+/*
+ * Offsets to string capabilities, with the corresponding functionkey codes.
+ */
struct tinfo_fkeys {
unsigned offset;
chtype code;
};
-#if BROKEN_LINKER
-
-#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
-extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
-
-#else
-
-extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
-
-#endif
-
typedef short HashValue;
- /*
- * The file comp_captab.c contains an array of these structures, one
- * per possible capability. These are indexed by a hash table array of
- * pointers to the same structures for use by the parser.
- */
-
+/*
+ * The file comp_captab.c contains an array of these structures, one per
+ * possible capability. These are indexed by a hash table array of pointers to
+ * the same structures for use by the parser.
+ */
struct name_table_entry
{
const char *nte_name; /* name to hash on */
@@ -201,10 +179,9 @@ struct name_table_entry
HashValue nte_link; /* index in table of next hash, or -1 */
};
- /*
- * Use this structure to hide differences between terminfo and termcap
- * tables.
- */
+/*
+ * Use this structure to hide differences between terminfo and termcap tables.
+ */
typedef struct {
unsigned table_size;
const HashValue *table_data;
@@ -219,11 +196,6 @@ struct alias
const char *source;
};
-extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
-extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
-extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
-extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
-
#define NOTFOUND ((struct name_table_entry *) 0)
/*
@@ -258,6 +230,10 @@ extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#ifdef NCURSES_TERM_ENTRY_H_incl
+/*
+ * These entrypoints are used only by the ncurses utilities such as tic.
+ */
+#ifdef NCURSES_INTERNALS
/* access.c */
extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *);
extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *);
@@ -266,9 +242,12 @@ extern NCURSES_EXPORT(bool) _nc_is_file_path (const char *);
extern NCURSES_EXPORT(char *) _nc_basename (char *);
extern NCURSES_EXPORT(char *) _nc_rootname (char *);
+/* comp_captab.c */
+extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
+extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
+extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
+
/* comp_hash.c: name lookup */
-extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
- (const char *, const HashValue *);
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
(const char *, int, bool);
@@ -276,7 +255,6 @@ extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
extern NCURSES_EXPORT(int) _nc_get_token (bool);
extern NCURSES_EXPORT(void) _nc_panic_mode (char);
extern NCURSES_EXPORT(void) _nc_push_token (int);
-extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
extern NCURSES_EXPORT_VAR(int) _nc_syntax;
@@ -298,11 +276,8 @@ extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFL
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
-/* comp_expand.c: expand string into readable form */
-extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
-
-/* comp_scan.c: decode string from readable form */
-extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *);
+/* comp_scan.c */
+extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
/* captoinfo.c: capability conversion */
extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const);
@@ -311,6 +286,14 @@ extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int con
/* home_terminfo.c */
extern NCURSES_EXPORT(char *) _nc_home_terminfo (void);
+/* init_keytry.c */
+#if BROKEN_LINKER
+#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
+extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
+#else
+extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
+#endif
+
/* lib_tparm.c */
#define NUM_PARM 9
@@ -318,8 +301,13 @@ extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
+/* lib_trace.c */
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
+extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
+
/* lib_tputs.c */
-extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
+extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
/* comp_main.c: compiler main */
extern const char * _nc_progname;
@@ -333,6 +321,26 @@ extern NCURSES_EXPORT(void) _nc_last_db(void);
/* write_entry.c */
extern NCURSES_EXPORT(int) _nc_tic_written (void);
+#endif /* NCURSES_INTERNALS */
+
+/*
+ * These entrypoints are used by tack.
+ */
+
+/* comp_hash.c: name lookup */
+extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
+ (const char *, const HashValue *);
+extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
+
+/* comp_scan.c: lexical analysis */
+extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
+
+/* comp_expand.c: expand string into readable form */
+extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
+
+/* comp_scan.c: decode string from readable form */
+extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *);
+
#endif /* NCURSES_TERM_ENTRY_H_incl */
#ifdef __cplusplus
diff --git a/man/curs_color.3x b/man/curs_color.3x
index d81eb299..47f59659 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.46 2017/01/07 19:57:48 tom Exp $
+.\" $Id: curs_color.3x,v 1.47 2017/03/13 21:49:37 tom Exp $
.TH curs_color 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@@ -43,12 +43,12 @@
\fBinit_pair\fR,
\fBinit_color\fR,
.\" .br
-\fBhas_colors\fR,
-\fBcan_change_color\fR,
-.\" .br
\fBcolor_content\fR,
\fBpair_content\fR,
.\" .br
+\fBhas_colors\fR,
+\fBcan_change_color\fR,
+.\" .br
\fBCOLOR_PAIR\fR,
\fBPAIR_NUMBER\fR \- \fBcurses\fR color manipulation routines
.ad
@@ -57,19 +57,19 @@
\fB#include \fR
.sp
\fBint start_color(void);\fR
-.br
+.sp
\fBint init_pair(short pair, short f, short b);\fR
.br
\fBint init_color(short color, short r, short g, short b);\fR
.sp
-\fBbool has_colors(void);\fR
-.br
-\fBbool can_change_color(void);\fR
-.sp
\fBint color_content(short color, short *r, short *g, short *b);\fR
.br
\fBint pair_content(short pair, short *f, short *b);\fR
.sp
+\fBbool has_colors(void);\fR
+.br
+\fBbool can_change_color(void);\fR
+.sp
\fBint COLOR_PAIR(int n);\fR
.br
\fBPAIR_NUMBER(\fR\fIattrs\fR\fB);\fP
diff --git a/man/curs_slk.3x b/man/curs_slk.3x
index 83de447b..d1927a10 100644
--- a/man/curs_slk.3x
+++ b/man/curs_slk.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" 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 *
@@ -26,8 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_slk.3x,v 1.23 2016/10/15 17:02:31 tom Exp $
+.\" $Id: curs_slk.3x,v 1.29 2017/03/18 01:00:30 tom Exp $
.TH curs_slk 3X ""
+.de bP
+.IP \(bu 4
+..
.na
.hy 0
.SH NAME
@@ -54,21 +57,23 @@
\fB#include \fR
.sp
\fBint slk_init(int fmt);\fR
-.br
+.sp
\fBint slk_set(int labnum, const char *label, int fmt);\fR
.br
+\fBint slk_wset(int labnum, const wchar_t *label, int fmt);\fR
+.sp
+\fBchar *slk_label(int labnum);\fR
+.sp
\fBint slk_refresh(void);\fR
.br
\fBint slk_noutrefresh(void);\fR
.br
-\fBchar *slk_label(int labnum);\fR
-.br
\fBint slk_clear(void);\fR
.br
\fBint slk_restore(void);\fR
.br
\fBint slk_touch(void);\fR
-.br
+.sp
\fBint slk_attron(const chtype attrs);\fR
.br
\fBint slk_attroff(const chtype attrs);\fR
@@ -79,14 +84,11 @@
.br
\fBint slk_attr_off(const attr_t attrs, void * opts);\fR
.br
-\fBint slk_attr_set(const attr_t attrs, short color_pair, void* opts);\fR
-.br
+\fBint slk_attr_set(const attr_t attrs, short pair, void* opts);\fR
+.sp
\fBattr_t slk_attr(void);\fR
-.br
-\fBint slk_color(short color_pair);\fR
-.br
-\fBint slk_wset(int labnum, const wchar_t *label, int fmt);\fR
-.br
+.sp
+\fBint slk_color(short pair);\fR
.SH DESCRIPTION
The slk* functions manipulate the set of soft function-key labels that exist on
many terminals.
@@ -98,18 +100,19 @@ labels of up to eight characters each.
In addition to this, the ncurses
implementation supports a mode where it simulates 12 labels of up to five
characters each.
-This is useful for today's PC-like enduser devices.
+This is useful for PC-like enduser devices.
ncurses simulates this mode by taking over up to two lines at
the bottom of the screen;
it does not try to use any hardware support for this
mode.
+.SS Initialization
.PP
The \fBslk_init\fR routine must be called before \fBinitscr\fR or \fBnewterm\fR
is called.
If \fBinitscr\fR eventually uses a line from \fBstdscr\fR to
emulate the soft labels,
then \fIfmt\fR determines how the labels are arranged on the screen:
-.RS
+.RS 3
.TP 3
.B 0
indicates a 3\-2\-3 arrangement of
@@ -126,11 +129,12 @@ is again the PC-like 4\-4\-4 mode,
but in addition an index line is generated, helping the user to
identify the key numbers easily.
.RE
+.SS Labels
.PP
The \fBslk_set\fR routine
(and the \fBslk_wset\fR routine for the wide-character library)
has three parameters:
-.RS
+.RS 3
.TP 5
.I labnum
is the label number, from \fB1\fR to \fB8\fR
@@ -150,11 +154,12 @@ left-justified, centered, or right-justified, respectively, within the
label.
.RE
.PP
-The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to
-the \fBwrefresh\fR and \fBwnoutrefresh\fR routines.
-.PP
The \fBslk_label\fR routine returns the current label for label number
\fIlabnum\fR, with leading and trailing blanks stripped.
+.SS Screen updates
+.PP
+The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to
+the \fBwrefresh\fR and \fBwnoutrefresh\fR routines.
.PP
The \fBslk_clear\fR routine clears the soft labels from the screen.
.PP
@@ -163,6 +168,7 @@ after a \fBslk_clear\fR has been performed.
.PP
The \fBslk_touch\fR routine forces all the soft labels to be output
the next time a \fBslk_noutrefresh\fR is performed.
+.SS Video attributes
.PP
The \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR and \fBslk_attr\fR
routines correspond to \fBattron\fR, \fBattrset\fR, \fBattroff\fR and \fBattr_get\fR.
@@ -170,6 +176,7 @@ They have an effect only if soft labels are simulated on the bottom line of
the screen.
The default highlight for soft keys is A_STANDOUT (as in
System V curses, which does not document this fact).
+.SS Colors
.PP
The \fBslk_color\fR routine corresponds to \fBcolor_set\fR.
It has an effect only
@@ -181,7 +188,7 @@ integer value other than \fBERR\fR") upon successful completion.
.PP
X/Open defines no error conditions.
In this implementation
-.RS
+.RS 3
.TP 5
\fBslk_attr\fR
returns the attribute used for the soft keys.
@@ -227,11 +234,22 @@ memory for the labels cannot be allocated.
Most applications would use \fBslk_noutrefresh\fR because a
\fBwrefresh\fR is likely to follow soon.
.SH PORTABILITY
-The XSI Curses standard, Issue 4, describes these functions.
-It changes the
-argument type of the attribute-manipulation functions \fBslk_attron\fR,
-\fBslk_attroff\fR, \fBslk_attrset\fR to be \fBattr_t\fR, and adds \fBconst\fR
-qualifiers.
+The XSI Curses standard, Issue 4, described the soft-key functions,
+with some differences from SVr4 curses:
+.bP
+It
+added functions like the SVr4
+the attribute-manipulation functions \fBslk_attron\fR,
+\fBslk_attroff\fR, \fBslk_attrset\fR
+which use \fBattr_t\fR parameters,
+along with a reserved \fIopts\fP parameter.
+.IP
+One of these new functions (\fBslk_attr_set\fP) also has a color-pair parameter.
+.bP
+It added \fBconst\fR qualifiers to parameters (unnecessarily), and
+.bP
+It added \fBslk_color\fP.
+.PP
The format codes \fB2\fR and \fB3\fR for \fBslk_init\fR and the
function \fBslk_attr\fR are specific to ncurses.
.SH SEE ALSO
diff --git a/man/legacy_coding.3x b/man/legacy_coding.3x
index 32ff783b..b3d7b41e 100644
--- a/man/legacy_coding.3x
+++ b/man/legacy_coding.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2005-2010,2016 Free Software Foundation, Inc. *
+.\" Copyright (c) 2005-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 *
@@ -28,10 +28,10 @@
.\"
.\" Author: Thomas E. Dickey
.\"
-.\" $Id: legacy_coding.3x,v 1.5 2016/10/15 17:02:31 tom Exp $
+.\" $Id: legacy_coding.3x,v 1.6 2017/03/15 08:14:25 tom Exp $
.TH legacy_coding 3X ""
.SH NAME
-\fBuse_legacy_coding\fR \- use terminal's default colors
+\fBuse_legacy_coding\fR \- override locale-encoding checks
.SH SYNOPSIS
\fB#include \fP
.sp
diff --git a/man/man_db.renames b/man/man_db.renames
index c8319d5a..7c2e47e9 100644
--- a/man/man_db.renames
+++ b/man/man_db.renames
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: man_db.renames,v 1.49 2017/03/12 00:43:15 tom Exp $
+# $Id: man_db.renames,v 1.50 2017/03/12 09:34:29 tom Exp $
# Manual-page renamings for the man_db program
#
# Files:
@@ -166,7 +166,7 @@ tic.1m tic.1
toe.1m toe.1
tput.1 tput.1
tset.1 tset.1
-vprintf.3s vprintf.3
+vprintf.3 vprintf.3
wresize.3x wresize.3ncurses
#
# Other:
diff --git a/man/manhtml.aliases b/man/manhtml.aliases
index 688862e6..e31ad3f8 100644
--- a/man/manhtml.aliases
+++ b/man/manhtml.aliases
@@ -1,4 +1,4 @@
-# $Id: manhtml.aliases,v 1.9 2017/03/05 00:55:53 tom Exp $
+# $Id: manhtml.aliases,v 1.11 2017/03/17 23:51:03 tom Exp $
#***************************************************************************
# Copyright (c) 2013-2016,2017 Free Software Foundation, Inc. *
# *
@@ -27,6 +27,7 @@
# authorization. *
#***************************************************************************
# Items in this list will be linked to the corresponding manpages by man2html
+assume_default_colors(3X) default_colors(3X)
addch(3X) curs_addch(3X)
curs_set(3X) curs_kernel(3X)
delscreen(3X) curs_initscr(3X)
@@ -40,6 +41,7 @@ infocmp(1) infocmp(1M)
initscr(3X) curs_initscr(3X)
is_scrollok(3X) curs_opaque(3X)
keypad(3X) curs_inopts(3X)
+longname(3X) curs_termattrs(3X)
meta(3X) curs_inopts(3X)
newterm(3X) curs_initscr(3X)
refresh(3X) curs_refresh(3X)
@@ -53,5 +55,6 @@ tigetstr(3X) curs_terminfo(3X)
tparm(3X) curs_terminfo(3X)
tputs(3X) curs_terminfo(3X)
use_env(3X) curs_util(3X)
+use_default_colors(3X) default_colors(3X)
vidputs(3X) curs_terminfo(3X)
wgetch(3X) curs_getch(3X)
diff --git a/man/manhtml.externs b/man/manhtml.externs
index d26b6127..48008694 100644
--- a/man/manhtml.externs
+++ b/man/manhtml.externs
@@ -1,5 +1,33 @@
-# $Id: manhtml.externs,v 1.3 2013/12/21 22:11:29 tom Exp $
+# $Id: manhtml.externs,v 1.4 2017/03/12 09:36:37 tom Exp $
# Items in this list will not be linked by man2html
+#***************************************************************************
+# Copyright (c) 2013,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. *
+#***************************************************************************
+ADACURSES(1)
conflict(1)
csh(1)
ded(1)
diff --git a/man/new_pair.3x b/man/new_pair.3x
index 46c23b48..8bd40202 100644
--- a/man/new_pair.3x
+++ b/man/new_pair.3x
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey
.\"
-.\" $Id: new_pair.3x,v 1.8 2017/03/09 09:59:11 tom Exp $
+.\" $Id: new_pair.3x,v 1.9 2017/03/13 21:21:34 tom Exp $
.TH new_pair 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@@ -52,12 +52,15 @@
..
.SH NAME
\fBalloc_pair\fP,
+\fBfind_pair\fP,
\fBfree_pair\fP \- new curses color-pair functions
.SH SYNOPSIS
\fB#include \fP
.sp
\fBint alloc_pair(int fg, int bg);\fP
.br
+\fBint find_pair(int fg, int bg);\fP
+.br
\fBint free_pair(int pair);\fP
.SH DESCRIPTION
These functions are an extension to the curses library.
diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c
index fc360bb8..52255c05 100644
--- a/ncurses/tinfo/read_entry.c
+++ b/ncurses/tinfo/read_entry.c
@@ -41,7 +41,7 @@
#include
-MODULE_ID("$Id: read_entry.c,v 1.141 2017/02/18 23:39:22 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.142 2017/03/16 08:19:06 tom Exp $")
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
@@ -180,7 +180,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
TR(TRACE_DATABASE,
(T_CALLED("_nc_read_termtype(ptr=%p, buffer=%p, limit=%d)"),
- ptr, buffer, limit));
+ (void *) ptr, buffer, limit));
TR(TRACE_DATABASE, ("READ termtype header @%d", offset));
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 441101ac..0de6a4da 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170311) unstable; urgency=low
+ncurses6 (6.0+20170318) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey Sun, 05 Mar 2017 14:24:08 -0500
+ -- Thomas E. Dickey Sun, 12 Mar 2017 05:25:40 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 441101ac..0de6a4da 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170311) unstable; urgency=low
+ncurses6 (6.0+20170318) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey Sun, 05 Mar 2017 14:24:08 -0500
+ -- Thomas E. Dickey Sun, 12 Mar 2017 05:25:40 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
diff --git a/package/debian/changelog b/package/debian/changelog
index d7043175..ea3a2997 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170311) unstable; urgency=low
+ncurses6 (6.0+20170318) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey Sun, 05 Mar 2017 14:24:08 -0500
+ -- Thomas E. Dickey Sun, 12 Mar 2017 05:25:40 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index 8dde281c..b2b3acbb 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.202 2017/03/05 19:24:08 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.203 2017/03/12 09:25:40 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@@ -10,7 +10,7 @@
!define VERSION_MAJOR "6"
!define VERSION_MINOR "0"
!define VERSION_YYYY "2017"
-!define VERSION_MMDD "0311"
+!define VERSION_MMDD "0318"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index f8249875..22f17266 100644
--- a/package/mingw-ncurses.spec
+++ b/package/mingw-ncurses.spec
@@ -3,7 +3,7 @@
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.0
-Release: 20170311
+Release: 20170318
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 67fd9f30..6156636c 100644
--- a/package/ncurses.spec
+++ b/package/ncurses.spec
@@ -1,7 +1,7 @@
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20170311
+Release: 20170318
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
diff --git a/progs/progs.priv.h b/progs/progs.priv.h
index 786fe558..a9d3d048 100644
--- a/progs/progs.priv.h
+++ b/progs/progs.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,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 *
@@ -30,7 +30,7 @@
* Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
- * $Id: progs.priv.h,v 1.41 2015/05/23 23:53:55 tom Exp $
+ * $Id: progs.priv.h,v 1.42 2017/03/18 18:08:25 tom Exp $
*
* progs.priv.h
*
@@ -118,6 +118,9 @@ extern char *optarg;
extern int optind;
#endif /* HAVE_GETOPT_H */
+#define NCURSES_INTERNALS 1
+#define NCURSES_OPAQUE 0
+
#include
#include
#include
diff --git a/test/demo_termcap.c b/test/demo_termcap.c
index c0db052c..1a95b00f 100644
--- a/test/demo_termcap.c
+++ b/test/demo_termcap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005-2015,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2005-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 *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_termcap.c,v 1.51 2016/09/10 21:22:39 tom Exp $
+ * $Id: demo_termcap.c,v 1.52 2017/03/18 22:03:07 tom Exp $
*
* A simple demo of the termcap interface.
*/
@@ -359,7 +359,7 @@ demo_termcap(NCURSES_CONST char *name)
#ifdef NCURSES_VERSION
if (x_opt && (my_blob == 0) && y_opt) {
#if NCURSES_XNAMES
- TERMTYPE *term = &(cur_term->type);
+ TERMTYPE *term = (TERMTYPE *) cur_term;
if (term != 0
&& ((NUM_BOOLEANS(term) != BOOLCOUNT)
|| (NUM_NUMBERS(term) != NUMCOUNT)
diff --git a/test/demo_terminfo.c b/test/demo_terminfo.c
index c1fffc70..5028e0ce 100644
--- a/test/demo_terminfo.c
+++ b/test/demo_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009-2015,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-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 *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_terminfo.c,v 1.44 2016/09/10 21:22:49 tom Exp $
+ * $Id: demo_terminfo.c,v 1.45 2017/03/18 22:03:07 tom Exp $
*
* A simple demo of the terminfo interface.
*/
@@ -363,7 +363,7 @@ demo_terminfo(char *name)
int mod;
if (y_opt) {
#if NCURSES_XNAMES
- TERMTYPE *term = &(cur_term->type);
+ TERMTYPE *term = (TERMTYPE *) cur_term;
if (term != 0
&& ((NUM_BOOLEANS(term) != BOOLCOUNT)
|| (NUM_NUMBERS(term) != NUMCOUNT)
diff --git a/test/list_keys.c b/test/list_keys.c
index 346878a5..75946950 100644
--- a/test/list_keys.c
+++ b/test/list_keys.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2016 Free Software Foundation, Inc. *
+ * Copyright (c) 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 *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: list_keys.c,v 1.17 2016/09/10 21:24:44 tom Exp $
+ * $Id: list_keys.c,v 1.18 2017/03/18 22:03:07 tom Exp $
*
* Author: Thomas E Dickey
*
@@ -288,7 +288,7 @@ list_keys(TERMINAL ** terms, int count)
TERMTYPE *term;
for (k = 0; k < count; ++k) {
set_curterm(terms[k]);
- term = &(cur_term->type);
+ term = (TERMTYPE *) cur_term;
total += (size_t) (NUM_STRINGS(term) - STRCOUNT);
}
}
@@ -309,7 +309,7 @@ list_keys(TERMINAL ** terms, int count)
int m, n;
for (k = 0; k < count; ++k) {
set_curterm(terms[k]);
- term = &(cur_term->type);
+ term = (TERMTYPE *) cur_term;
for (n = STRCOUNT; n < NUM_STRINGS(term); ++n) {
bool found = FALSE;
const char *estr = ExtStrname(term, (int) n, strnames);