mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-12-21 07:39:06 +08:00
ncurses 6.0 - patch 20170826
+ fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD + corrected a warning from tic about keys which are the same, to skip over missing/cancelled values. + add check in tic for unnecessary use of "2" to denote a shifted special key. + improve checks in trim_sgr0, comp_parse.c and parse_entry.c, for cancelled string capabilities. + add check in _nc_parse_entry() for invalid entry name, setting the name to "invalid" to avoid problems storing entries. + add/improve checks in tic's parser to address invalid input + add a check in comp_scan.c to handle the special case where a nontext file ending with a NUL rather than newline is given to tic as input (Redhat #1484274). + allow for cancelled capabilities in _nc_save_str (Redhat #1484276). + add validity checks for "use=" target in _nc_parse_entry (Redhat #1484284). + check for invalid strings in postprocess_termcap (Redhat #1484285) + reset secondary pointers on EOF in next_char() (Redhat #1484287). + guard _nc_safe_strcpy() and _nc_safe_strcat() against calls using cancelled strings (Redhat #1484291). + correct typo in curs_memleaks.3x (Sven Joachim). + improve test/configure checks for some curses variants not based on X/Open Curses. + add options for test/configure to disable checks for form, menu and panel libraries.
This commit is contained in:
parent
0485620c03
commit
5c2245b6fc
31
NEWS
31
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.2920 2017/08/19 20:10:50 tom Exp $
|
||||
-- $Id: NEWS,v 1.2935 2017/08/26 21:33:48 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,33 @@ 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.
|
||||
|
||||
20170826
|
||||
+ fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD
|
||||
+ corrected a warning from tic about keys which are the same, to skip
|
||||
over missing/cancelled values.
|
||||
+ add check in tic for unnecessary use of "2" to denote a shifted
|
||||
special key.
|
||||
+ improve checks in trim_sgr0, comp_parse.c and parse_entry.c, for
|
||||
cancelled string capabilities.
|
||||
+ add check in _nc_parse_entry() for invalid entry name, setting the
|
||||
name to "invalid" to avoid problems storing entries.
|
||||
+ add/improve checks in tic's parser to address invalid input
|
||||
+ add a check in comp_scan.c to handle the special case where a
|
||||
nontext file ending with a NUL rather than newline is given to tic
|
||||
as input (Redhat #1484274).
|
||||
+ allow for cancelled capabilities in _nc_save_str (Redhat #1484276).
|
||||
+ add validity checks for "use=" target in _nc_parse_entry (Redhat
|
||||
#1484284).
|
||||
+ check for invalid strings in postprocess_termcap (Redhat #1484285)
|
||||
+ reset secondary pointers on EOF in next_char() (Redhat #1484287).
|
||||
+ guard _nc_safe_strcpy() and _nc_safe_strcat() against calls using
|
||||
cancelled strings (Redhat #1484291).
|
||||
+ correct typo in curs_memleaks.3x (Sven Joachim).
|
||||
+ improve test/configure checks for some curses variants not based on
|
||||
X/Open Curses.
|
||||
+ add options for test/configure to disable checks for form, menu and
|
||||
panel libraries.
|
||||
|
||||
20170819
|
||||
+ update "iterm" entry -TD
|
||||
+ add "iterm2" entry (report by Leonardo Brondani Schenkel) -TD
|
||||
@ -4418,7 +4445,7 @@ it is not possible to add this information.
|
||||
|
||||
20080209
|
||||
+ update test programs to build/work with various UNIX curses for
|
||||
comparisons. This was to reinvestigate statement in X/Open curses
|
||||
comparisons. This was to reinvestigate statement in X/Open Curses
|
||||
that insnstr and winsnstr perform wrapping. None of the Unix-branded
|
||||
implementations do this, as noted in manpage (cf: 20040228).
|
||||
|
||||
|
4
dist.mk
4
dist.mk
@ -25,7 +25,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.1178 2017/08/13 21:24:56 tom Exp $
|
||||
# $Id: dist.mk,v 1.1179 2017/08/20 15:33:41 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 = 20170819
|
||||
NCURSES_PATCH = 20170826
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: ncurses_defs,v 1.74 2017/08/07 23:28:49 tom Exp $
|
||||
# $Id: ncurses_defs,v 1.75 2017/08/20 16:50:04 tom Exp $
|
||||
##############################################################################
|
||||
# Copyright (c) 2000-2016,2017 Free Software Foundation, Inc. #
|
||||
# #
|
||||
@ -50,7 +50,9 @@ HAVE_BSD_STRING_H
|
||||
HAVE_BTOWC
|
||||
HAVE_BUILTIN_H
|
||||
HAVE_CHGAT 1
|
||||
HAVE_COLOR_CONTENT 1
|
||||
HAVE_COLOR_SET 1
|
||||
HAVE_CURSCR 1
|
||||
HAVE_DIRENT_H
|
||||
HAVE_ERRNO
|
||||
HAVE_FCNTL_H
|
||||
|
@ -26,7 +26,7 @@
|
||||
.\" authorization. *
|
||||
.\"***************************************************************************
|
||||
.\"
|
||||
.\" $Id: curs_memleaks.3x,v 1.5 2017/07/28 00:04:34 tom Exp $
|
||||
.\" $Id: curs_memleaks.3x,v 1.6 2017/08/22 08:35:37 Sven.Joachim Exp $
|
||||
.TH curs_memleaks 3X ""
|
||||
.ie \n(.g .ds `` \(lq
|
||||
.el .ds `` ``
|
||||
@ -35,8 +35,8 @@
|
||||
.na
|
||||
.hy 0
|
||||
.SH NAME
|
||||
\fB_nc_freeall\fP
|
||||
\fB_nc_free_and_exit\fP
|
||||
\fB_nc_freeall\fP,
|
||||
\fB_nc_free_and_exit\fP,
|
||||
\fB_nc_free_tinfo\fP \- \fBcurses\fR memory-leak checking
|
||||
.ad
|
||||
.hy
|
||||
|
@ -6,8 +6,8 @@
|
||||
# Report bugs and new terminal descriptions to
|
||||
# bug-ncurses@gnu.org
|
||||
#
|
||||
# $Revision: 1.616 $
|
||||
# $Date: 2017/08/18 18:33:02 $
|
||||
# $Revision: 1.617 $
|
||||
# $Date: 2017/08/26 21:07:47 $
|
||||
#
|
||||
# The original header is preserved below for reference. It is noted that there
|
||||
# is a "newer" version which differs in some cosmetic details (but actually
|
||||
@ -462,7 +462,7 @@ ecma+color|color control for ECMA-48-compatible terminals,
|
||||
colors#8, ncv#3, pairs#64,
|
||||
op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
|
||||
|
||||
ecma+italics|ECMA-48 strikeout/crossed-out,
|
||||
ecma+italics|ECMA-48 italics,
|
||||
ritm=\E[23m, sitm=\E[3m,
|
||||
|
||||
# Attribute control for ECMA-48-compatible terminals
|
||||
@ -1396,13 +1396,13 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
|
||||
dsl=\E]2;\007, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
|
||||
flash=\E[?5h$<200/>\E[?5l, fsl=^G, home=\E[H,
|
||||
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
|
||||
il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^?, kcbt=\E[Z,
|
||||
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
|
||||
kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
|
||||
kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
|
||||
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
|
||||
khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m, rc=\E8,
|
||||
rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
|
||||
il=\E[%p1%dL, il1=\E[L, ind=\n, kLFT=\E[1;2D, kRIT=\E[1;2C,
|
||||
kbs=^?, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
|
||||
kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP,
|
||||
kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR,
|
||||
kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
|
||||
kf9=\E[20~, khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m,
|
||||
rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
|
||||
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
|
||||
rmso=\E[m, rmul=\E[m,
|
||||
rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
|
||||
@ -1412,8 +1412,8 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
|
||||
smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
|
||||
tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
|
||||
u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, TS=\E]2;,
|
||||
kEND5=\E[1;5F, kHOM5=\E[1;5H, kLFT2=\E[1;2D,
|
||||
kRIT2=\E[1;2C, use=vt100+keypad, use=xterm+256setaf,
|
||||
kEND5=\E[1;5F, kHOM5=\E[1;5H, use=vt100+keypad,
|
||||
use=xterm+256setaf,
|
||||
|
||||
# iTerm2 3.0.15
|
||||
#
|
||||
@ -1445,20 +1445,20 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
|
||||
# add/change that preference (set in Preferences, Profiles, Text). A new
|
||||
# install of iTerm 3.0.15 provides italics by default (blinking text:no).
|
||||
iTerm2.app|iterm2|terminal emulator for Mac OS X,
|
||||
blink@, dim=\E[2m, ka1@, ka3@, kb2@, kc1@, kc3@, kent@,
|
||||
kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S,
|
||||
kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ,
|
||||
kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
|
||||
kf23=\E[23;2~, kf24=\E[24;2~, kDN2=\E[1;2B, kDN3=\E\E[B,
|
||||
kDN4=\E[1;10B, kDN5=\E[1;5B, kDN6=\E[1;6B, kEND2=\E[1;2F,
|
||||
kEND3=\E[1;9F, kEND4=\E[1;10F, kEND6=\E[1;6F,
|
||||
kEND7=\E[1;13F, kEND8=\E[1;14F, kHOM2=\E[1;2H,
|
||||
kHOM3=\E[1;9H, kHOM4=\E[1;10H, kHOM6=\E[1;6H,
|
||||
kHOM7=\E[1;13H, kHOM8=\E[1;14H, kLFT3=\E\E[D,
|
||||
kLFT4=\E[1;10D, kLFT5=\E[1;5D, kLFT6=\E[1;6D,
|
||||
kNXT3=\E\E[6~, kPRV3=\E\E[5~, kRIT3=\E\E[C,
|
||||
kRIT4=\E[1;10C, kRIT5=\E[1;5C, kRIT6=\E[1;6C,
|
||||
kUP2=\E[1;2A, kUP3=\E\E[A, kUP4=\E[1;10A, kUP5=\E[1;5A,
|
||||
blink@, dim=\E[2m, kEND=\E[1;2F, kHOM=\E[1;2H, ka1@, ka3@,
|
||||
kb2@, kc1@, kc3@, kent@, kf13=\E[1;2P, kf14=\E[1;2Q,
|
||||
kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
|
||||
kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
|
||||
kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
|
||||
kind=\E[1;2B, kri=\E[1;2A, kDN3=\E\E[B, kDN4=\E[1;10B,
|
||||
kDN5=\E[1;5B, kDN6=\E[1;6B, kEND3=\E[1;9F,
|
||||
kEND4=\E[1;10F, kEND6=\E[1;6F, kEND7=\E[1;13F,
|
||||
kEND8=\E[1;14F, kHOM3=\E[1;9H, kHOM4=\E[1;10H,
|
||||
kHOM6=\E[1;6H, kHOM7=\E[1;13H, kHOM8=\E[1;14H,
|
||||
kLFT3=\E\E[D, kLFT4=\E[1;10D, kLFT5=\E[1;5D,
|
||||
kLFT6=\E[1;6D, kNXT3=\E\E[6~, kPRV3=\E\E[5~,
|
||||
kRIT3=\E\E[C, kRIT4=\E[1;10C, kRIT5=\E[1;5C,
|
||||
kRIT6=\E[1;6C, kUP3=\E\E[A, kUP4=\E[1;10A, kUP5=\E[1;5A,
|
||||
kUP6=\E[1;6A, use=ecma+italics, use=iterm,
|
||||
|
||||
# xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
|
||||
@ -25248,4 +25248,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
|
||||
# 2017-08-18
|
||||
# + update notes on user-defined capabilities -TD
|
||||
#
|
||||
# 2017-08-26
|
||||
# + fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD
|
||||
#
|
||||
######## SHANTIH! SHANTIH! SHANTIH!
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: alloc_entry.c,v 1.60 2017/06/27 23:48:55 tom Exp $")
|
||||
MODULE_ID("$Id: alloc_entry.c,v 1.61 2017/08/25 09:09:08 tom Exp $")
|
||||
|
||||
#define ABSENT_OFFSET -1
|
||||
#define CANCELLED_OFFSET -2
|
||||
@ -98,7 +98,7 @@ _nc_save_str(const char *const string)
|
||||
size_t old_next_free = next_free;
|
||||
size_t len;
|
||||
|
||||
if (string == 0)
|
||||
if (!VALID_STRING(string))
|
||||
return _nc_save_str("");
|
||||
len = strlen(string) + 1;
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: comp_parse.c,v 1.97 2017/08/04 09:02:21 tom Exp $")
|
||||
MODULE_ID("$Id: comp_parse.c,v 1.99 2017/08/26 16:15:50 tom Exp $")
|
||||
|
||||
static void sanity_check2(TERMTYPE2 *, bool);
|
||||
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
|
||||
@ -510,9 +510,9 @@ static void
|
||||
fixup_acsc(TERMTYPE2 *tp, int literal)
|
||||
{
|
||||
if (!literal) {
|
||||
if (acs_chars == 0
|
||||
&& enter_alt_charset_mode != 0
|
||||
&& exit_alt_charset_mode != 0)
|
||||
if (acs_chars == ABSENT_STRING
|
||||
&& PRESENT(enter_alt_charset_mode)
|
||||
&& PRESENT(exit_alt_charset_mode))
|
||||
acs_chars = strdup(VT_ACSC);
|
||||
}
|
||||
}
|
||||
@ -568,9 +568,7 @@ sanity_check2(TERMTYPE2 *tp, bool literal)
|
||||
PAIRED(enter_xon_mode, exit_xon_mode);
|
||||
PAIRED(enter_am_mode, exit_am_mode);
|
||||
ANDMISSING(label_off, label_on);
|
||||
#ifdef remove_clock
|
||||
PAIRED(display_clock, remove_clock);
|
||||
#endif
|
||||
ANDMISSING(set_color_pair, initialize_pair);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include <ctype.h>
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: comp_scan.c,v 1.106 2017/04/22 11:41:12 tom Exp $")
|
||||
MODULE_ID("$Id: comp_scan.c,v 1.108 2017/08/25 22:57:21 tom Exp $")
|
||||
|
||||
/*
|
||||
* Maximum length of string capability we'll accept before raising an error.
|
||||
@ -168,6 +168,8 @@ next_char(void)
|
||||
if (result != 0) {
|
||||
FreeAndNull(result);
|
||||
FreeAndNull(pushname);
|
||||
bufptr = 0;
|
||||
bufstart = 0;
|
||||
allocated = 0;
|
||||
}
|
||||
/*
|
||||
@ -222,6 +224,8 @@ next_char(void)
|
||||
}
|
||||
if ((bufptr = bufstart) != 0) {
|
||||
used = strlen(bufptr);
|
||||
if (used == 0)
|
||||
return (EOF);
|
||||
while (iswhite(*bufptr)) {
|
||||
if (*bufptr == '\t') {
|
||||
_nc_curr_col = (_nc_curr_col | 7) + 1;
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <ctype.h>
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: parse_entry.c,v 1.86 2017/06/28 00:53:12 tom Exp $")
|
||||
MODULE_ID("$Id: parse_entry.c,v 1.91 2017/08/26 16:13:34 tom Exp $")
|
||||
|
||||
#ifdef LINT
|
||||
static short const parametrized[] =
|
||||
@ -180,6 +180,20 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
|
||||
}
|
||||
#endif /* NCURSES_XNAMES */
|
||||
|
||||
static bool
|
||||
valid_entryname(const char *name)
|
||||
{
|
||||
bool result = TRUE;
|
||||
int ch;
|
||||
while ((ch = UChar(*name++)) != '\0') {
|
||||
if (ch <= ' ' || ch > '~' || ch == '/') {
|
||||
result = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* int
|
||||
* _nc_parse_entry(entry, literal, silent)
|
||||
@ -211,6 +225,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
|
||||
int token_type;
|
||||
struct name_table_entry const *entry_ptr;
|
||||
char *ptr, *base;
|
||||
const char *name;
|
||||
bool bad_tc_usage = FALSE;
|
||||
|
||||
token_type = _nc_get_token(silent);
|
||||
@ -261,7 +276,12 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
|
||||
* results in the terminal type getting prematurely set to correspond
|
||||
* to that of the next entry.
|
||||
*/
|
||||
_nc_set_type(_nc_first_name(entryp->tterm.term_names));
|
||||
name = _nc_first_name(entryp->tterm.term_names);
|
||||
if (!valid_entryname(name)) {
|
||||
_nc_warning("invalid entry name \"%s\"", name);
|
||||
name = "invalid";
|
||||
}
|
||||
_nc_set_type(name);
|
||||
|
||||
/* check for overly-long names and aliases */
|
||||
for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
|
||||
@ -283,13 +303,24 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
|
||||
bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
|
||||
bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
|
||||
if (is_use || is_tc) {
|
||||
if (!VALID_STRING(_nc_curr_token.tk_valstring)
|
||||
|| _nc_curr_token.tk_valstring[0] == '\0') {
|
||||
_nc_warning("missing name for use-clause");
|
||||
continue;
|
||||
} else if (!valid_entryname(_nc_curr_token.tk_valstring)) {
|
||||
_nc_warning("invalid name for use-clause \"%s\"",
|
||||
_nc_curr_token.tk_valstring);
|
||||
continue;
|
||||
} else if (entryp->nuses >= MAX_USES) {
|
||||
_nc_warning("too many use-clauses, ignored \"%s\"",
|
||||
_nc_curr_token.tk_valstring);
|
||||
continue;
|
||||
}
|
||||
entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
|
||||
entryp->uses[entryp->nuses].line = _nc_curr_line;
|
||||
if (VALID_STRING(entryp->uses[entryp->nuses].name)) {
|
||||
entryp->nuses++;
|
||||
if (entryp->nuses > 1 && is_tc) {
|
||||
BAD_TC_USAGE
|
||||
}
|
||||
entryp->nuses++;
|
||||
if (entryp->nuses > 1 && is_tc) {
|
||||
BAD_TC_USAGE
|
||||
}
|
||||
} else {
|
||||
/* normal token lookup */
|
||||
@ -640,13 +671,6 @@ static const char C_LF[] = "\n";
|
||||
static const char C_BS[] = "\b";
|
||||
static const char C_HT[] = "\t";
|
||||
|
||||
/*
|
||||
* Note that WANTED and PRESENT are not simple inverses! If a capability
|
||||
* has been explicitly cancelled, it's not considered WANTED.
|
||||
*/
|
||||
#define WANTED(s) ((s) == ABSENT_STRING)
|
||||
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
|
||||
|
||||
/*
|
||||
* This bit of legerdemain turns all the terminfo variable names into
|
||||
* references to locations in the arrays Booleans, Numbers, and Strings ---
|
||||
@ -672,10 +696,10 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
|
||||
/* if there was a tc entry, assume we picked up defaults via that */
|
||||
if (!has_base) {
|
||||
if (WANTED(init_3string) && termcap_init2)
|
||||
if (WANTED(init_3string) && PRESENT(termcap_init2))
|
||||
init_3string = _nc_save_str(termcap_init2);
|
||||
|
||||
if (WANTED(reset_2string) && termcap_reset)
|
||||
if (WANTED(reset_2string) && PRESENT(termcap_reset))
|
||||
reset_2string = _nc_save_str(termcap_reset);
|
||||
|
||||
if (WANTED(carriage_return)) {
|
||||
@ -790,7 +814,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
if (init_tabs != 8 && init_tabs != ABSENT_NUMERIC)
|
||||
_nc_warning("hardware tabs with a width other than 8: %d", init_tabs);
|
||||
else {
|
||||
if (tab && _nc_capcmp(tab, C_HT))
|
||||
if (PRESENT(tab) && _nc_capcmp(tab, C_HT))
|
||||
_nc_warning("hardware tabs with a non-^I tab string %s",
|
||||
_nc_visbuf(tab));
|
||||
else {
|
||||
@ -867,17 +891,22 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
* The magic moment -- copy the mapped key string over,
|
||||
* stripping out padding.
|
||||
*/
|
||||
for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
|
||||
if (bp[0] == '$' && bp[1] == '<') {
|
||||
while (*bp && *bp != '>') {
|
||||
++bp;
|
||||
}
|
||||
} else
|
||||
*dp++ = *bp;
|
||||
}
|
||||
*dp = '\0';
|
||||
bp = tp->Strings[from_ptr->nte_index];
|
||||
if (VALID_STRING(bp)) {
|
||||
for (dp = buf2; *bp; bp++) {
|
||||
if (bp[0] == '$' && bp[1] == '<') {
|
||||
while (*bp && *bp != '>') {
|
||||
++bp;
|
||||
}
|
||||
} else
|
||||
*dp++ = *bp;
|
||||
}
|
||||
*dp = '\0';
|
||||
|
||||
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
|
||||
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
|
||||
} else {
|
||||
tp->Strings[to_ptr->nte_index] = bp;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -886,7 +915,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
* got mapped to kich1 and im to kIC to avoid a collision.
|
||||
* If the description has im but not ic, hack kIC back to kich1.
|
||||
*/
|
||||
if (foundim && WANTED(key_ic) && key_sic) {
|
||||
if (foundim && WANTED(key_ic) && PRESENT(key_sic)) {
|
||||
key_ic = key_sic;
|
||||
key_sic = ABSENT_STRING;
|
||||
}
|
||||
@ -938,9 +967,9 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
acs_chars = _nc_save_str(buf2);
|
||||
_nc_warning("acsc string synthesized from XENIX capabilities");
|
||||
}
|
||||
} else if (acs_chars == 0
|
||||
&& enter_alt_charset_mode != 0
|
||||
&& exit_alt_charset_mode != 0) {
|
||||
} else if (acs_chars == ABSENT_STRING
|
||||
&& PRESENT(enter_alt_charset_mode)
|
||||
&& PRESENT(exit_alt_charset_mode)) {
|
||||
acs_chars = _nc_save_str(VT_ACSC);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2000-2007,2012 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2000-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 *
|
||||
@ -35,8 +35,9 @@
|
||||
**/
|
||||
|
||||
#include <curses.priv.h>
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $")
|
||||
MODULE_ID("$Id: strings.c,v 1.9 2017/08/26 13:16:11 tom Exp $")
|
||||
|
||||
/****************************************************************************
|
||||
* Useful string functions (especially for mvcur)
|
||||
@ -105,7 +106,7 @@ _nc_str_copy(string_desc * dst, string_desc * src)
|
||||
NCURSES_EXPORT(bool)
|
||||
_nc_safe_strcat(string_desc * dst, const char *src)
|
||||
{
|
||||
if (src != 0) {
|
||||
if (PRESENT(src)) {
|
||||
size_t len = strlen(src);
|
||||
|
||||
if (len < dst->s_size) {
|
||||
@ -126,7 +127,7 @@ _nc_safe_strcat(string_desc * dst, const char *src)
|
||||
NCURSES_EXPORT(bool)
|
||||
_nc_safe_strcpy(string_desc * dst, const char *src)
|
||||
{
|
||||
if (src != 0) {
|
||||
if (PRESENT(src)) {
|
||||
size_t len = strlen(src);
|
||||
|
||||
if (len < dst->s_size) {
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: trim_sgr0.c,v 1.16 2017/04/05 22:33:07 tom Exp $")
|
||||
MODULE_ID("$Id: trim_sgr0.c,v 1.17 2017/08/26 14:54:16 tom Exp $")
|
||||
|
||||
#undef CUR
|
||||
#define CUR tp->
|
||||
@ -263,7 +263,7 @@ _nc_trim_sgr0(TERMTYPE2 *tp)
|
||||
/*
|
||||
* If rmacs is a substring of sgr(0), remove that chunk.
|
||||
*/
|
||||
if (exit_alt_charset_mode != 0) {
|
||||
if (PRESENT(exit_alt_charset_mode)) {
|
||||
TR(TRACE_DATABASE, ("scan for rmacs %s", _nc_visbuf(exit_alt_charset_mode)));
|
||||
j = strlen(off);
|
||||
k = strlen(exit_alt_charset_mode);
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.0+20170819) unstable; urgency=low
|
||||
ncurses6 (6.0+20170826) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 13 Aug 2017 17:24:56 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Aug 2017 11:33:41 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.0+20170819) unstable; urgency=low
|
||||
ncurses6 (6.0+20170826) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 13 Aug 2017 17:24:56 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Aug 2017 11:33:41 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.0+20170819) unstable; urgency=low
|
||||
ncurses6 (6.0+20170826) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 13 Aug 2017 17:24:56 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Aug 2017 11:33:41 -0400
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $Id: mingw-ncurses.nsi,v 1.226 2017/08/13 21:24:56 tom Exp $
|
||||
; $Id: mingw-ncurses.nsi,v 1.227 2017/08/20 15:33:41 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 "0819"
|
||||
!define VERSION_MMDD "0826"
|
||||
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
|
||||
|
||||
!define MY_ABI "5"
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: mingw32-ncurses6
|
||||
Version: 6.0
|
||||
Release: 20170819
|
||||
Release: 20170826
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Version: 6.0
|
||||
Release: 20170819
|
||||
Release: 20170826
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
75
progs/tic.c
75
progs/tic.c
@ -48,7 +48,7 @@
|
||||
#include <parametrized.h>
|
||||
#include <transform.h>
|
||||
|
||||
MODULE_ID("$Id: tic.c,v 1.240 2017/07/29 16:14:16 tom Exp $")
|
||||
MODULE_ID("$Id: tic.c,v 1.243 2017/08/26 20:56:55 tom Exp $")
|
||||
|
||||
#define STDIN_NAME "<stdin>"
|
||||
|
||||
@ -62,6 +62,10 @@ static bool showsummary = FALSE;
|
||||
static char **namelst = 0;
|
||||
static const char *to_remove;
|
||||
|
||||
#if NCURSES_XNAMES
|
||||
static bool using_extensions = FALSE;
|
||||
#endif
|
||||
|
||||
static void (*save_check_termtype) (TERMTYPE2 *, bool);
|
||||
static void check_termtype(TERMTYPE2 *tt, bool);
|
||||
|
||||
@ -850,6 +854,7 @@ main(int argc, char *argv[])
|
||||
/* FALLTHRU */
|
||||
case 'x':
|
||||
use_extended_names(TRUE);
|
||||
using_extensions = TRUE;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -2447,10 +2452,17 @@ check_conflict(TERMTYPE2 *tp)
|
||||
const char *a = given[j].value;
|
||||
bool first = TRUE;
|
||||
|
||||
if (!VALID_STRING(a))
|
||||
continue;
|
||||
|
||||
for (k = j + 1; given[k].keycode; k++) {
|
||||
const char *b = given[k].value;
|
||||
|
||||
if (!VALID_STRING(b))
|
||||
continue;
|
||||
if (check[k])
|
||||
continue;
|
||||
|
||||
if (!_nc_capcmp(a, b)) {
|
||||
check[j] = 1;
|
||||
check[k] = 1;
|
||||
@ -2473,6 +2485,67 @@ check_conflict(TERMTYPE2 *tp)
|
||||
if (!first)
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
#if NCURSES_XNAMES
|
||||
if (using_extensions) {
|
||||
/* *INDENT-OFF* */
|
||||
static struct {
|
||||
const char *xcurses;
|
||||
const char *shifted;
|
||||
} table[] = {
|
||||
{ "kDC", NULL },
|
||||
{ "kDN", "kind" },
|
||||
{ "kEND", NULL },
|
||||
{ "kHOM", NULL },
|
||||
{ "kLFT", NULL },
|
||||
{ "kNXT", NULL },
|
||||
{ "kPRV", NULL },
|
||||
{ "kRIT", NULL },
|
||||
{ "kUP", "kri" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/*
|
||||
* SVr4 curses defines the "xcurses" names listed above except for
|
||||
* the special cases in the "shifted" column. When using these
|
||||
* names for xterm's extensions, that was confusing, and resulted
|
||||
* in adding extended capabilities with "2" (shift) suffix. This
|
||||
* check warns about unnecessary use of extensions for this quirk.
|
||||
*/
|
||||
for (j = 0; given[j].keycode; ++j) {
|
||||
const char *find = given[j].name;
|
||||
int value;
|
||||
char ch;
|
||||
|
||||
if (!VALID_STRING(given[j].value))
|
||||
continue;
|
||||
|
||||
for (k = 0; table[k].xcurses; ++k) {
|
||||
const char *test = table[k].xcurses;
|
||||
size_t size = strlen(test);
|
||||
|
||||
if (!strncmp(find, test, size) && strcmp(find, test)) {
|
||||
switch (sscanf(find + size, "%d%c", &value, &ch)) {
|
||||
case 1:
|
||||
if (value == 2) {
|
||||
_nc_warning("expected '%s' rather than '%s'",
|
||||
(table[k].shifted
|
||||
? table[k].shifted
|
||||
: test), find);
|
||||
} else if (value < 2 || value > 15) {
|
||||
_nc_warning("expected numeric 2..15 '%s'", find);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_nc_warning("expected numeric suffix for '%s'", find);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
free(given);
|
||||
free(check);
|
||||
}
|
||||
|
55
test/aclocal.m4
vendored
55
test/aclocal.m4
vendored
@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written *
|
||||
dnl authorization. *
|
||||
dnl***************************************************************************
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.139 2017/08/12 12:12:49 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.142 2017/08/20 18:12:43 tom Exp $
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey
|
||||
dnl
|
||||
@ -838,36 +838,35 @@ if test ".$ac_cv_func_initscr" != .yes ; then
|
||||
then
|
||||
for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
|
||||
do
|
||||
AC_CHECK_LIB($cf_curs_lib,initscr,[break])
|
||||
LIBS="-l$cf_curs_lib $cf_save_LIBS"
|
||||
if test "$cf_term_lib" = unknown ; then
|
||||
AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr()],
|
||||
[cf_result=yes],
|
||||
[cf_result=no])
|
||||
AC_MSG_RESULT($cf_result)
|
||||
test $cf_result = yes && break
|
||||
elif test "$cf_curs_lib" = "$cf_term_lib" ; then
|
||||
cf_result=no
|
||||
elif test "$cf_term_lib" != predefined ; then
|
||||
AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr(); tgoto((char *)0, 0, 0);],
|
||||
[cf_result=no],
|
||||
[
|
||||
LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr()],
|
||||
[cf_result=yes],
|
||||
[cf_result=error])
|
||||
])
|
||||
AC_MSG_RESULT($cf_result)
|
||||
test $cf_result != error && break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
|
||||
|
||||
LIBS="-l$cf_curs_lib $cf_save_LIBS"
|
||||
if test "$cf_term_lib" = unknown ; then
|
||||
AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr()],
|
||||
[cf_result=yes],
|
||||
[cf_result=no])
|
||||
AC_MSG_RESULT($cf_result)
|
||||
test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
|
||||
elif test "$cf_curs_lib" = "$cf_term_lib" ; then
|
||||
:
|
||||
elif test "$cf_term_lib" != predefined ; then
|
||||
AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr(); tgoto((char *)0, 0, 0);],
|
||||
[cf_result=no],
|
||||
[
|
||||
LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
|
||||
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[initscr()],
|
||||
[cf_result=yes],
|
||||
[cf_result=error])
|
||||
])
|
||||
AC_MSG_RESULT($cf_result)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
3805
test/configure
vendored
3805
test/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey 1996-on
|
||||
dnl
|
||||
dnl $Id: configure.in,v 1.134 2017/08/19 23:40:39 tom Exp $
|
||||
dnl $Id: configure.in,v 1.135 2017/08/20 16:38:29 tom Exp $
|
||||
dnl This is a simple configuration-script for the ncurses test programs that
|
||||
dnl allows the test-directory to be separately configured against a reference
|
||||
dnl system (i.e., sysvr4 curses)
|
||||
@ -134,10 +134,6 @@ case $cf_cv_screen in
|
||||
(ncurses*)
|
||||
cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
|
||||
;;
|
||||
(curses|curses_*)
|
||||
CF_NETBSD_FORM_H
|
||||
CF_NETBSD_MENU_H
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl If we've not specified a library, assume we're using sysvr4 libraries
|
||||
@ -145,27 +141,90 @@ dnl installed conventionally (e.g., SunOS 5.x - solaris).
|
||||
|
||||
dnl Autoconf builds up the $LIBS in reverse order
|
||||
|
||||
cf_curses_headers=
|
||||
|
||||
case $cf_cv_screen in
|
||||
(pdcurses)
|
||||
cf_default_panel=no
|
||||
cf_default_form=no
|
||||
cf_default_menu=no
|
||||
cf_default_tinfo=no
|
||||
;;
|
||||
(xcurses|bsdcurses)
|
||||
cf_default_panel=no
|
||||
cf_default_form=no
|
||||
cf_default_menu=no
|
||||
cf_default_tinfo=yes
|
||||
;;
|
||||
(*)
|
||||
# look for curses-related libraries
|
||||
CF_CHECK_CURSES_LIB(panel,$cf_cv_libtype,new_panel)
|
||||
CF_CHECK_CURSES_LIB(menu,$cf_cv_libtype,menu_driver)
|
||||
CF_CHECK_CURSES_LIB(form,$cf_cv_libtype,form_driver)
|
||||
|
||||
# look for curses-related headers
|
||||
AC_CHECK_HEADERS( \
|
||||
nc_alloc.h \
|
||||
nomacros.h \
|
||||
form.h \
|
||||
menu.h \
|
||||
panel.h \
|
||||
term_entry.h \
|
||||
)
|
||||
cf_default_panel=yes
|
||||
cf_default_form=yes
|
||||
cf_default_menu=yes
|
||||
cf_default_tinfo=yes
|
||||
case $cf_cv_screen in
|
||||
(ncurses*)
|
||||
cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(if you want to check for panel functions)
|
||||
CF_ARG_DISABLE(panel,
|
||||
[ --disable-panel disable checks for panel functions],
|
||||
cf_enable_panel=no,
|
||||
cf_enable_panel=$cf_default_panel,
|
||||
yes)
|
||||
AC_MSG_RESULT($cf_enable_panel)
|
||||
if test $cf_enable_panel = yes
|
||||
then
|
||||
CF_CHECK_CURSES_LIB(panel,$cf_cv_libtype,new_panel)
|
||||
cf_curses_headers="$cf_curses_headers panel.h"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if you want to check for menu functions)
|
||||
CF_ARG_DISABLE(menu,
|
||||
[ --disable-menu disable checks for menu functions],
|
||||
cf_enable_menu=no,
|
||||
cf_enable_menu=$cf_default_menu,
|
||||
yes)
|
||||
AC_MSG_RESULT($cf_enable_menu)
|
||||
if test $cf_enable_menu = yes
|
||||
then
|
||||
case $cf_cv_screen in
|
||||
(ncurses*)
|
||||
;;
|
||||
(curses*)
|
||||
CF_NETBSD_MENU_H
|
||||
;;
|
||||
esac
|
||||
CF_CHECK_CURSES_LIB(menu,$cf_cv_libtype,menu_driver)
|
||||
cf_curses_headers="$cf_curses_headers menu.h"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if you want to check for form functions)
|
||||
CF_ARG_DISABLE(form,
|
||||
[ --disable-form disable checks for form functions],
|
||||
cf_enable_form=no,
|
||||
cf_enable_form=$cf_default_form,
|
||||
yes)
|
||||
AC_MSG_RESULT($cf_enable_form)
|
||||
if test $cf_enable_form = yes
|
||||
then
|
||||
case $cf_cv_screen in
|
||||
(ncurses*)
|
||||
;;
|
||||
(curses*)
|
||||
CF_NETBSD_FORM_H
|
||||
;;
|
||||
esac
|
||||
CF_CHECK_CURSES_LIB(form,$cf_cv_libtype,form_driver)
|
||||
cf_curses_headers="$cf_curses_headers form.h"
|
||||
fi
|
||||
|
||||
# look for curses-related headers
|
||||
AC_CHECK_HEADERS( $cf_curses_headers )
|
||||
|
||||
AC_STDC_HEADERS
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS( \
|
||||
@ -211,6 +270,7 @@ CF_CURSES_FUNCS( \
|
||||
alloc_pair \
|
||||
assume_default_colors \
|
||||
chgat \
|
||||
color_content \
|
||||
color_set \
|
||||
filter \
|
||||
getbegx \
|
||||
@ -358,6 +418,7 @@ if test "$cf_enable_widec" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
CF_CURSES_CHECK_DATA(curscr)
|
||||
CF_CURSES_CHECK_DATA(ospeed)
|
||||
CF_CURSES_CHECK_DATA(boolnames)
|
||||
CF_CURSES_CHECK_DATA(boolfnames)
|
||||
|
@ -33,7 +33,7 @@
|
||||
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
|
||||
* added September 20th 1995.
|
||||
*
|
||||
* $Id: knight.c,v 1.37 2017/04/15 17:43:11 tom Exp $
|
||||
* $Id: knight.c,v 1.38 2017/08/20 16:15:42 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -719,6 +719,7 @@ play(void)
|
||||
}
|
||||
break;
|
||||
|
||||
#if HAVE_CURSCR
|
||||
case KEY_REDO:
|
||||
case '\f':
|
||||
case 'r':
|
||||
@ -729,6 +730,7 @@ play(void)
|
||||
wnoutrefresh(helpwin);
|
||||
doupdate();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 'q':
|
||||
case 'x':
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: picsmap.c,v 1.100 2017/08/19 23:42:27 tom Exp $
|
||||
* $Id: picsmap.c,v 1.101 2017/08/20 16:42:13 tom Exp $
|
||||
*
|
||||
* Author: Thomas E. Dickey
|
||||
*
|
||||
@ -659,12 +659,16 @@ init_palette(const char *palette_file)
|
||||
all_colors = typeMalloc(RGB_DATA, (unsigned) COLORS);
|
||||
how_much.data += (sizeof(RGB_DATA) * (unsigned) COLORS);
|
||||
|
||||
#if HAVE_COLOR_CONTENT
|
||||
for (cp = 0; cp < COLORS; ++cp) {
|
||||
color_content((short) cp,
|
||||
&all_colors[cp].red,
|
||||
&all_colors[cp].green,
|
||||
&all_colors[cp].blue);
|
||||
}
|
||||
#else
|
||||
memset(all_colors, 0, sizeof(RGB_DATA) * (size_t) COLORS);
|
||||
#endif
|
||||
if (data != 0) {
|
||||
int n;
|
||||
int red, green, blue;
|
||||
@ -1470,7 +1474,7 @@ show_picture(PICS_HEAD * pics)
|
||||
debugmsg("called show_picture");
|
||||
#if USE_EXTENDED_COLORS
|
||||
reset_color_pairs();
|
||||
#else
|
||||
#elif HAVE_CURSCR
|
||||
wclear(curscr);
|
||||
clear();
|
||||
#endif
|
||||
@ -1528,7 +1532,8 @@ show_picture(PICS_HEAD * pics)
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
mvgetch(0, 0);
|
||||
wmove(stdscr, 0, 0);
|
||||
getch();
|
||||
}
|
||||
if (!quiet)
|
||||
endwin();
|
||||
|
@ -29,7 +29,7 @@
|
||||
/****************************************************************************
|
||||
* Author: Thomas E. Dickey 1996-on *
|
||||
****************************************************************************/
|
||||
/* $Id: test.priv.h,v 1.147 2017/08/19 23:40:19 tom Exp $ */
|
||||
/* $Id: test.priv.h,v 1.148 2017/08/20 16:51:33 tom Exp $ */
|
||||
|
||||
#ifndef __TEST_PRIV_H
|
||||
#define __TEST_PRIV_H 1
|
||||
@ -69,14 +69,23 @@
|
||||
#ifndef HAVE_BSD_STRING_H
|
||||
#define HAVE_BSD_STRING_H 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CURSES_VERSION
|
||||
#define HAVE_CURSES_VERSION 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CURSCR
|
||||
#define HAVE_CURSCR 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CHGAT
|
||||
#define HAVE_CHGAT 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_COLOR_CONTENT
|
||||
#define HAVE_COLOR_CONTENT 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_COLOR_SET
|
||||
#define HAVE_COLOR_SET 0
|
||||
#endif
|
||||
@ -564,6 +573,14 @@ extern int optind;
|
||||
#define WACS_STERLING &(CURSES_WACS_ARRAY['}'])
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
#define OK (0)
|
||||
#endif
|
||||
|
||||
#ifndef ERR
|
||||
#define ERR (-1)
|
||||
#endif
|
||||
|
||||
#undef CTRL
|
||||
#define CTRL(x) ((x) & 0x1f)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user