mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2025-01-24 15:13:56 +08:00
ncurses 6.1 - patch 20190126
+ change some "%define" statements in test-packages for RPMs to "%global" to work around changes in rpm 4.14 from recent Redhat. + fixes for O_INPUT_FIELD extension (patch by Leon Winter). + eliminate fixed buffer-size when reading $TERMCAP variable. + correct logic in read_entry.c which prevented $TERMCAP variable from being interpreted as a fallback to terminfo entry (prompted by Savannah #54556, cf: 20110924).
This commit is contained in:
parent
eccca377f5
commit
fe8c285d2a
11
NEWS
11
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.3261 2019/01/21 22:51:52 tom Exp $
|
||||
-- $Id: NEWS,v 1.3266 2019/01/27 00:23:49 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,15 @@ 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.
|
||||
|
||||
20190126
|
||||
+ change some "%define" statements in test-packages for RPMs to
|
||||
"%global" to work around changes in rpm 4.14 from recent Redhat.
|
||||
+ fixes for O_INPUT_FIELD extension (patch by Leon Winter).
|
||||
+ eliminate fixed buffer-size when reading $TERMCAP variable.
|
||||
+ correct logic in read_entry.c which prevented $TERMCAP variable from
|
||||
being interpreted as a fallback to terminfo entry (prompted by
|
||||
Savannah #54556, cf: 20110924).
|
||||
|
||||
20190121
|
||||
+ add a check in test/configure to work around non-ncurses termcap.h
|
||||
file in Slackware.
|
||||
|
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.1263 2019/01/21 01:57:34 tom Exp $
|
||||
# $Id: dist.mk,v 1.1264 2019/01/22 23:47:52 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 = 1
|
||||
NCURSES_PATCH = 20190121
|
||||
NCURSES_PATCH = 20190126
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_max.c,v 1.14 2019/01/19 21:26:06 Leon.Winter Exp $")
|
||||
MODULE_ID("$Id: fld_max.c,v 1.15 2019/01/26 22:18:08 Leon.Winter Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -63,7 +63,9 @@ set_max_field(FIELD *field, int maxgrow)
|
||||
RETURN(E_BAD_ARGUMENT);
|
||||
}
|
||||
field->maxgrow = maxgrow;
|
||||
if (Field_Has_Option(field, O_INPUT_LIMIT) && field->dcols > maxgrow)
|
||||
/* shrink */
|
||||
if (maxgrow > 0 && Field_Has_Option(field, O_INPUT_LIMIT) &&
|
||||
field->dcols > maxgrow)
|
||||
field->dcols = maxgrow;
|
||||
ClrStatus(field, _MAY_GROW);
|
||||
if (!((unsigned)field->opts & O_STATIC))
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2018,2019 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: Juergen Pfeifer, 1995,1997 *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: form.priv.h,v 0.43 2018/04/14 21:06:14 Leon.Winter Exp $ */
|
||||
/* $Id: form.priv.h,v 0.44 2019/01/26 22:17:48 Leon.Winter Exp $ */
|
||||
|
||||
#ifndef FORM_PRIV_H
|
||||
#define FORM_PRIV_H 1
|
||||
@ -167,7 +167,8 @@ TypeArgument;
|
||||
STD_FIELD_OPTS |\
|
||||
O_DYNAMIC_JUSTIFY |\
|
||||
O_NO_LEFT_STRIP |\
|
||||
O_EDGE_INSERT_STAY)
|
||||
O_EDGE_INSERT_STAY |\
|
||||
O_INPUT_LIMIT)
|
||||
|
||||
#define C_BLANK ' '
|
||||
#define is_blank(c) ((c)==C_BLANK)
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: read_entry.c,v 1.152 2019/01/21 14:56:40 tom Exp $")
|
||||
MODULE_ID("$Id: read_entry.c,v 1.153 2019/01/23 00:02:04 tom Exp $")
|
||||
|
||||
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
|
||||
|
||||
@ -821,7 +821,7 @@ _nc_read_tic_entry(char *filename,
|
||||
code = _nc_read_file_entry(filename, tp);
|
||||
}
|
||||
#if NCURSES_USE_TERMCAP
|
||||
else if (code != TGETENT_YES) {
|
||||
if (code != TGETENT_YES) {
|
||||
code = _nc_read_termcap_entry(name, tp);
|
||||
_nc_SPRINTF(filename, _nc_SLIMIT(PATH_MAX)
|
||||
"%.*s", PATH_MAX - 1, _nc_get_source());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2018,2019 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 *
|
||||
@ -56,7 +56,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: read_termcap.c,v 1.96 2018/05/12 18:52:02 tom Exp $")
|
||||
MODULE_ID("$Id: read_termcap.c,v 1.97 2019/01/26 20:07:30 tom Exp $")
|
||||
|
||||
#if !PURE_TERMINFO
|
||||
|
||||
@ -965,6 +965,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
#endif
|
||||
#if USE_GETCAP
|
||||
char *p, tc[TBUFSIZ];
|
||||
char *tc_buf = 0;
|
||||
#define MY_SIZE sizeof(tc) - 1
|
||||
int status;
|
||||
static char *source;
|
||||
@ -983,8 +984,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0
|
||||
&& !_nc_is_abs_path(p) && _nc_name_match(p, tn, "|:")) {
|
||||
/* TERMCAP holds a termcap entry */
|
||||
_nc_STRNCPY(tc, p, MY_SIZE);
|
||||
tc[MY_SIZE] = '\0';
|
||||
tc_buf = strdup(p);
|
||||
_nc_set_source("TERMCAP");
|
||||
} else {
|
||||
/* we're using getcap(3) */
|
||||
@ -993,8 +993,13 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
|
||||
_nc_curr_line = lineno;
|
||||
_nc_set_source(source);
|
||||
tc_buf = tc;
|
||||
}
|
||||
_nc_read_entry_source((FILE *) 0, tc, FALSE, TRUE, NULLHOOK);
|
||||
if (tc_buf == 0)
|
||||
return (TGETENT_ERR);
|
||||
_nc_read_entry_source((FILE *) 0, tc_buf, FALSE, TRUE, NULLHOOK);
|
||||
if (tc_buf != tc)
|
||||
free(tc_buf);
|
||||
#else
|
||||
/*
|
||||
* Here is what the 4.4BSD termcap(3) page prescribes:
|
||||
@ -1028,7 +1033,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
int j, k;
|
||||
bool use_buffer = FALSE;
|
||||
bool normal = TRUE;
|
||||
char tc_buf[1024];
|
||||
char *tc_buf = 0;
|
||||
char pathbuf[PATH_MAX];
|
||||
char *copied = 0;
|
||||
char *cp;
|
||||
@ -1040,10 +1045,8 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
ADD_TC(tc, 0);
|
||||
normal = FALSE;
|
||||
} else if (_nc_name_match(tc, tn, "|:")) { /* treat as a capability file */
|
||||
use_buffer = TRUE;
|
||||
_nc_SPRINTF(tc_buf,
|
||||
_nc_SLIMIT(sizeof(tc_buf))
|
||||
"%.*s\n", (int) sizeof(tc_buf) - 2, tc);
|
||||
tc_buf = strdup(tc);
|
||||
use_buffer = (tc_buf != 0);
|
||||
normal = FALSE;
|
||||
}
|
||||
}
|
||||
@ -1112,6 +1115,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
|
||||
* that since it's just a single entry, they won't be a pain.
|
||||
*/
|
||||
_nc_read_entry_source((FILE *) 0, tc_buf, FALSE, FALSE, NULLHOOK);
|
||||
free(tc_buf);
|
||||
} else {
|
||||
int i;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.1+20190121) unstable; urgency=low
|
||||
ncurses6 (6.1+20190126) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Jan 2019 20:57:34 -0500
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 22 Jan 2019 18:47:52 -0500
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.1+20190121) unstable; urgency=low
|
||||
ncurses6 (6.1+20190126) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Jan 2019 20:57:34 -0500
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 22 Jan 2019 18:47:52 -0500
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.1+20190121) unstable; urgency=low
|
||||
ncurses6 (6.1+20190126) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Jan 2019 20:57:34 -0500
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 22 Jan 2019 18:47:52 -0500
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $Id: mingw-ncurses.nsi,v 1.310 2019/01/21 01:57:34 tom Exp $
|
||||
; $Id: mingw-ncurses.nsi,v 1.311 2019/01/22 23:47:52 tom Exp $
|
||||
|
||||
; TODO add examples
|
||||
; TODO bump ABI to 6
|
||||
@ -10,7 +10,7 @@
|
||||
!define VERSION_MAJOR "6"
|
||||
!define VERSION_MINOR "1"
|
||||
!define VERSION_YYYY "2019"
|
||||
!define VERSION_MMDD "0121"
|
||||
!define VERSION_MMDD "0126"
|
||||
!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.1
|
||||
Release: 20190121
|
||||
Release: 20190126
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Version: 6.1
|
||||
Release: 20190121
|
||||
Release: 20190126
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Curses library with POSIX thread support.
|
||||
Name: ncursest6
|
||||
Version: 6.1
|
||||
Release: 20190121
|
||||
Release: 20190126
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,10 +1,10 @@
|
||||
Summary: ncurses-examples - example/test programs from ncurses
|
||||
%?mingw_package_header
|
||||
|
||||
%define AppProgram ncurses-examples
|
||||
%define AppVersion MAJOR.MINOR
|
||||
%define AppRelease YYYYMMDD
|
||||
# $Id: mingw-ncurses-examples.spec,v 1.7 2018/01/04 02:31:57 tom Exp $
|
||||
%global AppProgram ncurses-examples
|
||||
%global AppVersion MAJOR.MINOR
|
||||
%global AppRelease YYYYMMDD
|
||||
# $Id: mingw-ncurses-examples.spec,v 1.8 2019/01/27 00:22:16 tom Exp $
|
||||
Name: mingw32-ncurses6-examples
|
||||
Version: %{AppVersion}
|
||||
Release: %{AppRelease}
|
||||
|
@ -1,9 +1,9 @@
|
||||
Summary: example/test programs from ncurses
|
||||
%define AppProgram ncurses-examples
|
||||
%define AltProgram ncursest-examples
|
||||
%define AppVersion MAJOR.MINOR
|
||||
%define AppRelease YYYYMMDD
|
||||
# $Id: ncurses-examples.spec,v 1.12 2018/06/02 22:46:44 tom Exp $
|
||||
%global AppProgram ncurses-examples
|
||||
%global AltProgram ncursest-examples
|
||||
%global AppVersion MAJOR.MINOR
|
||||
%global AppRelease YYYYMMDD
|
||||
# $Id: ncurses-examples.spec,v 1.13 2019/01/27 00:22:06 tom Exp $
|
||||
Name: %{AppProgram}
|
||||
Version: %{AppVersion}
|
||||
Release: %{AppRelease}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2017,2019 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 *
|
||||
@ -51,7 +51,7 @@
|
||||
* scroll operation worked, and the refresh() code only had to do a
|
||||
* partial repaint.
|
||||
*
|
||||
* $Id: view.c,v 1.135 2017/10/23 09:18:01 tom Exp $
|
||||
* $Id: view.c,v 1.136 2019/01/27 00:52:06 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -145,7 +145,7 @@ show_all(const char *tag)
|
||||
_nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
|
||||
"view %.*s", (int) strlen(tag), tag);
|
||||
i = (int) strlen(temp);
|
||||
_nc_SPRINTF(temp + i, _nc_SLIMIT(sizeof(temp) - i)
|
||||
_nc_SPRINTF(temp + i, _nc_SLIMIT(sizeof(temp) - (size_t) i)
|
||||
" %.*s", (int) sizeof(temp) - i - 2, fname);
|
||||
move(0, 0);
|
||||
printw("%.*s", COLS, temp);
|
||||
|
Loading…
Reference in New Issue
Block a user