ncurses 5.9 - patch 20140503

+ add vt520ansi terminfo entry (patch by Mike Gran)
+ further improve MinGW support for the scenario where there is an
  ANSI-escapes handler such as ansicon running in the console window
  (patch by Juergen Pfeifer).
This commit is contained in:
Thomas E. Dickey 2014-05-03 23:36:44 +00:00
parent 7d3e03f12f
commit d129a54c07
15 changed files with 708 additions and 496 deletions

8
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.2196 2014/04/26 20:31:03 tom Exp $
-- $Id: NEWS,v 1.2199 2014/05/03 23:22:01 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,12 @@ 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.
20140503
+ add vt520ansi terminfo entry (patch by Mike Gran)
+ further improve MinGW support for the scenario where there is an
ANSI-escapes handler such as ansicon running in the console window
(patch by Juergen Pfeifer).
20140426
+ add --disable-lib-suffixes option (adapted from patch by Juergen
Pfeifer).

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.983 2014/04/26 14:41:17 tom Exp $
# $Id: dist.mk,v 1.984 2014/05/03 15:27:36 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 = 5
NCURSES_MINOR = 9
NCURSES_PATCH = 20140426
NCURSES_PATCH = 20140503
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2011 Free Software Foundation, Inc. *
* Copyright (c) 2011,2014 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 2011 *
****************************************************************************/
/* $Id: nc_termios.h,v 1.2 2011/06/25 20:44:05 tom Exp $ */
/* $Id: nc_termios.h,v 1.3 2014/05/03 19:40:10 juergen Exp $ */
#ifndef NC_TERMIOS_included
#define NC_TERMIOS_included 1
@ -71,98 +71,88 @@
#if __MINGW32__
/* c_cc chars */
#define VINTR 0
#define VQUIT 1
#define VERASE 2
#define VKILL 3
#define VEOF 4
#define VTIME 5
#define VMIN 6
/* lflag bits */
#define ISIG 0x0001
#define ICANON 0x0002
#define ECHO 0x0004
#define ECHOE 0x0008
#define ECHOK 0x0010
#define ECHONL 0x0020
#define NOFLSH 0x0040
#define IEXTEN 0x0100
/* c_iflag bits */
#define ISTRIP 0000040
#define INLCR 0000100
#define IGNCR 0000200
#define ICRNL 0000400
#define BRKINT 0000002
#define PARMRK 0000010
#define IXON 0002000
#define IGNBRK 0000001
#define IGNPAR 0000004
#define INPCK 0000020
#define IXOFF 0010000
#define VEOF 4
#define VERASE 5
#define VINTR 6
#define VKILL 7
#define VMIN 9
#define VQUIT 10
#define VTIME 16
/* c_oflag bits */
#define OPOST 0000001
/* iflag bits */
#define IGNBRK 0x00001
#define BRKINT 0x00002
#define IGNPAR 0x00004
#define INPCK 0x00010
#define ISTRIP 0x00020
#define INLCR 0x00040
#define IGNCR 0x00080
#define ICRNL 0x00100
#define IXON 0x00400
#define IXOFF 0x01000
#define PARMRK 0x10000
/* c_cflag bit meaning */
#define CBAUD 0010017
#define CSIZE 0000060
#define CS8 0000060
#define B0 0000000
#define B50 0000001
#define B75 0000002
#define B110 0000003
#define B134 0000004
#define B150 0000005
#define B200 0000006
#define B300 0000007
#define B600 0000010
#define B1200 0000011
#define B1800 0000012
#define B2400 0000013
#define B4800 0000014
#define B9600 0000015
#define CLOCAL 0004000
#define CREAD 0000200
#define CSTOPB 0000100
#define HUPCL 0002000
#define PARENB 0000400
#define PARODD 0001000
/* oflag bits */
#define OPOST 0x00001
/* c_lflag bits */
#define ECHO 0000010
#define ECHONL 0000100
#define ISIG 0000001
#define IEXTEN 0100000
#define ICANON 0000002
#define NOFLSH 0000200
#define ECHOE 0000020
#define ECHOK 0000040
/* cflag bits */
#define CBAUD 0x0100f
#define B0 0x00000
#define B50 0x00001
#define B75 0x00002
#define B110 0x00003
#define B134 0x00004
#define B150 0x00005
#define B200 0x00006
#define B300 0x00007
#define B600 0x00008
#define B1200 0x00009
#define B1800 0x0000a
#define B2400 0x0000b
#define B4800 0x0000c
#define B9600 0x0000d
/* tcflush() */
#define TCIFLUSH 0
#define CSIZE 0x00030
#define CS8 0x00030
#define CSTOPB 0x00040
#define CREAD 0x00080
#define PARENB 0x00100
#define PARODD 0x00200
#define HUPCL 0x00400
#define CLOCAL 0x00800
/* tcsetattr uses these */
#define TCSADRAIN 1
/* ioctls */
#define TCGETA 0x5405
#define TCFLSH 0x540B
#define TIOCGWINSZ 0x5413
#define TCIFLUSH 0
#define TCSADRAIN 3
#ifndef cfgetospeed
#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
#endif
#ifndef tcsetattr
#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
#define tcsetattr(fd, opt, arg) _nc_mingw_tcsetattr(fd, opt, arg)
#endif
#ifndef tcgetattr
#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
#define tcgetattr(fd, arg) _nc_mingw_tcgetattr(fd, arg)
#endif
#ifndef tcflush
#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
#define tcflush(fd, queue) _nc_mingw_tcflush(fd, queue)
#endif
#undef ttyname
#define ttyname(fd) NULL
#else
#endif /* __MINGW32__ */
#endif /* HAVE_TERMIO_H */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. *
* Copyright (c) 1998-2011,2014 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 *
@ -31,7 +31,7 @@
* *
****************************************************************************/
/* $Id: ncurses_mingw.h,v 1.2 2011/06/25 20:51:00 tom Exp $ */
/* $Id: ncurses_mingw.h,v 1.3 2014/05/03 19:40:19 juergen Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
@ -47,28 +47,36 @@
#undef TERMIOS
#define TERMIOS 1
#define InvalidHandle ((TERM_HANDLE)-1)
#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
typedef unsigned int speed_t;
typedef unsigned short otcflag_t;
typedef unsigned char ospeed_t;
#define NCCS 32
#define NCCS 18
struct termios
{
tcflag_t c_iflag; /* input mode */
tcflag_t c_oflag; /* output mode */
tcflag_t c_cflag; /* control mode */
tcflag_t c_lflag; /* local mode */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* c_ospeed */
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
char c_line;
cc_t c_cc[NCCS];
speed_t c_ispeed;
speed_t c_ospeed;
};
extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
extern void _nc_set_term_driver(void* term);
extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
int fd,
int optional_actions,
const struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
int fd,
struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
int fd,
int queue);
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
#endif /* _NC_MINGWH */
#endif /* __MINGW32__ */

View File

@ -6,8 +6,8 @@
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
# $Revision: 1.491 $
# $Date: 2014/03/29 23:45:51 $
# $Revision: 1.492 $
# $Date: 2014/05/03 23:19:22 $
#
# 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
@ -3421,6 +3421,17 @@ vt520|DEC VT520,
vt525|DEC VT525,
use=vt520,
# I just got a brand new Boundless VT520 with that company's "ANSI 2011"
# Keyboard, which replaces the old LK41R-AA keyboard.
#
# In trying to get the function keys to work, I had to cobble my own
# terminfo.src entry, since the existing vt520 entry doesn't include most of
# the function keys.  If I blend the entries for "vt420f" and "vt220+keypad"
# I seem to get them all -Mike Gran
vt520ansi|Boundless VT520 ANSI,
use=ansi+rca, use=vt420f, use=vt220+keypad,
use=ansi+tabs,
#### VT100 emulations
#
@ -23289,4 +23300,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# * updated "st" entry (leaving the 0.1.1 version as "simpleterm") to
# 0.4.1 -TD
#
# 2014-05-03
# * add vt520ansi (Mike Gran)
#
######## SHANTIH! SHANTIH! SHANTIH!

View File

@ -42,7 +42,7 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_getch.c,v 1.128 2014/04/26 18:47:20 juergen Exp $")
MODULE_ID("$Id: lib_getch.c,v 1.130 2014/05/03 20:49:50 tom Exp $")
#include <fifo_defs.h>
@ -133,7 +133,16 @@ check_mouse_activity(SCREEN *sp, int delay EVENTLIST_2nd(_nc_eventlist * evl))
int rc;
#ifdef USE_TERM_DRIVER
TERMINAL_CONTROL_BLOCK *TCB = TCBOf(sp);
rc = TCBOf(sp)->drv->td_testmouse(TCBOf(sp), delay EVENTLIST_2nd(evl));
# ifdef __MINGW32__
/* if we emulate terminfo on console, we have to use the console routine */
if (IsTermInfoOnConsole(sp)) {
HANDLE fd = (HANDLE) _get_osfhandle(sp->_ifd);
rc = _nc_mingw_testmouse(sp, fd, delay EVENTLIST_2nd(evl));
} else
# endif
rc = TCB->drv->td_testmouse(TCB, delay EVENTLIST_2nd(evl));
#else
#if USE_SYSMOUSE
if ((sp->_mouse_type == M_SYSMOUSE)
@ -268,7 +277,14 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
{ /* Can block... */
#ifdef USE_TERM_DRIVER
int buf;
n = CallDriver_1(sp, td_read, &buf);
#ifdef __MINGW32__
if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && sp->_cbreak)
n = _nc_mingw_console_read(sp,
(HANDLE) _get_osfhandle(sp->_ifd),
&buf);
else
#endif
n = CallDriver_1(sp, td_read, &buf);
ch = buf;
#else
unsigned char c2 = 0;

View File

@ -34,7 +34,7 @@
****************************************************************************/
/*
* $Id: curses.priv.h,v 1.535 2014/04/26 18:45:36 juergen Exp $
* $Id: curses.priv.h,v 1.537 2014/05/03 21:20:12 tom Exp $
*
* curses.priv.h
*
@ -2212,7 +2212,6 @@ extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
sp->jump = outc
#ifdef USE_TERM_DRIVER
typedef void* TERM_HANDLE;
typedef struct _termInfo
{
@ -2278,9 +2277,6 @@ typedef struct term_driver {
typedef struct DriverTCB
{
TERMINAL term; /* needs to be the first Element !!! */
TERM_HANDLE inp; /* The input handle of the Terminal */
TERM_HANDLE out; /* The output handle of the Terminal in shell mode */
TERM_HANDLE hdl; /* The output handle of the Terminal in prog mode */
TERM_DRIVER* drv; /* The driver for that Terminal */
SCREEN* csp; /* The screen that owns that Terminal */
TerminalInfo info; /* Driver independent core capabilities of the Terminal */
@ -2352,16 +2348,37 @@ extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
extern NCURSES_EXPORT(int) _nc_mingw_isatty(int fd);
extern NCURSES_EXPORT(int) _nc_mingw_isconsole(int fd);
extern NCURSES_EXPORT(int) _nc_mingw_console_read(
SCREEN *sp,
HANDLE fd,
int *buf);
extern NCURSES_EXPORT(int) _nc_mingw_testmouse(
SCREEN * sp,
HANDLE fd,
int delay);
#else
#endif
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
#endif
#ifdef USE_TERM_DRIVER
#define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo)))
#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
#if defined(USE_TERM_DRIVER) && defined(__MINGW32__)
#define NC_ISATTY(fd) _nc_mingw_isatty(fd)
#else
#define IsTermInfo(sp) TRUE
#define HasTInfoTerminal(sp) (0 != TerminalOf(sp))
#define NC_ISATTY(fd) isatty(fd)
#endif
#ifdef USE_TERM_DRIVER
# define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo)))
# define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
# ifdef __MINGW32__
# define IsTermInfoOnConsole(sp) (IsTermInfo(sp)&&_nc_mingw_isconsole(TerminalOf(sp)->Filedes))
#else
# define IsTermInfoOnConsole(sp) FALSE
# endif
#else
# define IsTermInfo(sp) TRUE
# define HasTInfoTerminal(sp) (0 != TerminalOf(sp))
# define IsTermInfoOnConsole(sp) FALSE
#endif
#define IsValidTIScreen(sp) (HasTInfoTerminal(sp))
@ -2463,12 +2480,6 @@ extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
#endif
#ifndef __MINGW32__
# define NC_ISATTY(fd) isatty(fd)
#else
# define NC_ISATTY(fd) _nc_mingw_isatty(fd)
#endif
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140426) unstable; urgency=low
ncurses6 (5.9-20140503) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 May 2014 11:27:36 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140426) unstable; urgency=low
ncurses6 (5.9-20140503) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 May 2014 11:27:36 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140426) unstable; urgency=low
ncurses6 (5.9-20140503) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 May 2014 11:27:36 -0400
ncurses6 (5.9-20120608) unstable; urgency=low

View File

@ -1,4 +1,4 @@
; $Id: mingw-ncurses.nsi,v 1.38 2014/04/26 14:41:17 tom Exp $
; $Id: mingw-ncurses.nsi,v 1.39 2014/05/03 15:27:36 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@ -10,7 +10,7 @@
!define VERSION_MAJOR "5"
!define VERSION_MINOR "9"
!define VERSION_YYYY "2014"
!define VERSION_MMDD "0426"
!define VERSION_MMDD "0503"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"

View File

@ -3,7 +3,7 @@
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 5.9
Release: 20140426
Release: 20140503
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz

View File

@ -1,7 +1,7 @@
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 5.9
Release: 20140426
Release: 20140503
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz

View File

@ -40,7 +40,7 @@ AUTHOR
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
$Id: ncurses.c,v 1.397 2014/02/01 22:29:37 tom Exp $
$Id: ncurses.c,v 1.398 2014/05/03 19:38:16 juergen Exp $
***************************************************************************/
@ -6690,7 +6690,7 @@ usage(void)
#if USE_LIBPANEL
," -s msec specify nominal time for panel-demo (default: 1, to hold)"
#endif
#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714)
#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment"
#endif
#ifdef TRACE
@ -6929,7 +6929,7 @@ main(int argc, char *argv[])
nap_msec = (int) atol(optarg);
break;
#endif
#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714)
#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
case 'T':
use_tioctl(TRUE);
break;