mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2025-01-30 15:19:27 +08:00
ncurses 5.9 - patch 20140426
+ add --disable-lib-suffixes option (adapted from patch by Juergen Pfeifer). + merge some changes from Juergen Pfeifer's work with MSYS2, to simplify later merging: + use NC_ISATTY() macro for isatty() in library + add _nc_mingw_isatty() and related functions to windows-driver + rename terminal driver entrypoints to simplify grep's + remove a check in the sp-funcs flavor of newterm() which allowed only the first call to newterm() to succeed (report by Thomas Beierlein, cf: 20090927).
This commit is contained in:
parent
3a2f63eb5a
commit
7d3e03f12f
6
INSTALL
6
INSTALL
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: INSTALL,v 1.170 2014/04/12 23:10:33 tom Exp $
|
||||
-- $Id: INSTALL,v 1.171 2014/04/26 20:30:01 tom Exp $
|
||||
---------------------------------------------------------------------
|
||||
How to install Ncurses/Terminfo on your system
|
||||
---------------------------------------------------------------------
|
||||
@ -337,6 +337,10 @@ SUMMARY OF CONFIGURE OPTIONS:
|
||||
--disable-largefile
|
||||
Disable compiler flags needed to use large-file interfaces.
|
||||
|
||||
--disable-lib-suffixes
|
||||
Suppress the "w", "t" or "tw" suffixes which normally would be added
|
||||
to the library names for the --enable-widec and --with-pthread options.
|
||||
|
||||
--disable-libtool-version
|
||||
when using --with-libtool, control how the major/minor version numbers
|
||||
are used for constructing the library name.
|
||||
|
14
NEWS
14
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.2193 2014/04/19 18:33:37 tom Exp $
|
||||
-- $Id: NEWS,v 1.2196 2014/04/26 20:31:03 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,18 @@ 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.
|
||||
|
||||
20140426
|
||||
+ add --disable-lib-suffixes option (adapted from patch by Juergen
|
||||
Pfeifer).
|
||||
+ merge some changes from Juergen Pfeifer's work with MSYS2, to
|
||||
simplify later merging:
|
||||
+ use NC_ISATTY() macro for isatty() in library
|
||||
+ add _nc_mingw_isatty() and related functions to windows-driver
|
||||
+ rename terminal driver entrypoints to simplify grep's
|
||||
+ remove a check in the sp-funcs flavor of newterm() which allowed only
|
||||
the first call to newterm() to succeed (report by Thomas Beierlein,
|
||||
cf: 20090927).
|
||||
|
||||
20140419
|
||||
+ update config.guess, config.sub from
|
||||
http://git.savannah.gnu.org/cgit/config.git
|
||||
|
31
configure.in
31
configure.in
@ -1,5 +1,5 @@
|
||||
dnl***************************************************************************
|
||||
dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
|
||||
dnl Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
|
||||
dnl *
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
dnl copy of this software and associated documentation files (the *
|
||||
@ -28,14 +28,14 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey 1995-on
|
||||
dnl
|
||||
dnl $Id: configure.in,v 1.578 2014/03/22 22:58:09 tom Exp $
|
||||
dnl $Id: configure.in,v 1.579 2014/04/26 20:02:13 tom Exp $
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl See http://invisible-island.net/autoconf/ for additional information.
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_PREREQ(2.52.20030208)
|
||||
AC_REVISION($Revision: 1.578 $)
|
||||
AC_REVISION($Revision: 1.579 $)
|
||||
AC_INIT(ncurses/base/lib_initscr.c)
|
||||
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
|
||||
|
||||
@ -421,6 +421,14 @@ if test "$CC_SHARED_OPTS" = "unknown"; then
|
||||
done
|
||||
fi
|
||||
|
||||
# pretend that ncurses==ncursesw==ncursest
|
||||
AC_MSG_CHECKING(if you want to disable library suffixes)
|
||||
AC_ARG_ENABLE(lib-suffixes,
|
||||
[ --disable-lib-suffixes disable library suffixes],
|
||||
[disable_lib_suffixes=$enableval],
|
||||
[disable_lib_suffixes=no])
|
||||
AC_MSG_RESULT($disable_lib_suffixes)
|
||||
|
||||
### If we're building with rpath, try to link non-standard libs that way too.
|
||||
if test "$DFT_LWR_MODEL" = "shared"; then
|
||||
CF_DISABLE_RPATH_HACK
|
||||
@ -743,7 +751,9 @@ AC_ARG_ENABLE(widec,
|
||||
[with_widec=no])
|
||||
AC_MSG_RESULT($with_widec)
|
||||
if test "x$with_widec" = xyes ; then
|
||||
LIB_SUFFIX="w${LIB_SUFFIX}"
|
||||
if test "x$disable_lib_suffixes" = xno ; then
|
||||
LIB_SUFFIX="w${LIB_SUFFIX}"
|
||||
fi
|
||||
AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code])
|
||||
AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code])
|
||||
|
||||
@ -1186,11 +1196,17 @@ if test "x$with_reentrant" = xyes ; then
|
||||
# except cygwin, where we only do that if ALSO
|
||||
# compiling with full thread support.
|
||||
case "$host" in
|
||||
*cygwin* | *msys*)
|
||||
*cygwin* | *msys*) #(vi
|
||||
if test "$with_pthread" = "yes" ; then
|
||||
LIB_SUFFIX="t${LIB_SUFFIX}"
|
||||
if test "x$disable_lib_suffixes" = "xno" ; then
|
||||
LIB_SUFFIX="t${LIB_SUFFIX}"
|
||||
fi
|
||||
fi ;;
|
||||
* ) LIB_SUFFIX="t${LIB_SUFFIX}" ;;
|
||||
*)
|
||||
if test "x$disable_lib_suffixes" = "xno" ; then
|
||||
LIB_SUFFIX="t${LIB_SUFFIX}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use experimental reentrant feature])
|
||||
@ -1340,6 +1356,7 @@ AC_SUBST(ADA_TRACE)
|
||||
### Checks for libraries.
|
||||
case $cf_cv_system_name in #(vi
|
||||
*mingw32*) #(vi
|
||||
LIBS=" -lpsapi $LIBS"
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_FUNC(gettimeofday,
|
||||
|
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.982 2014/04/19 16:03:50 tom Exp $
|
||||
# $Id: dist.mk,v 1.983 2014/04/26 14:41:17 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 = 20140419
|
||||
NCURSES_PATCH = 20140426
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include <curses.priv.h>
|
||||
|
||||
MODULE_ID("$Id: lib_getch.c,v 1.127 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_getch.c,v 1.128 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
#include <fifo_defs.h>
|
||||
|
||||
@ -259,7 +259,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
|
||||
} else
|
||||
#endif
|
||||
#if USE_KLIBC_KBD
|
||||
if (isatty(sp->_ifd) && sp->_cbreak) {
|
||||
if (NC_ISATTY(sp->_ifd) && sp->_cbreak) {
|
||||
ch = _read_kbd(0, 1, !sp->_raw);
|
||||
n = (ch == -1) ? -1 : 1;
|
||||
sp->_extended_key = (ch == 0);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2009,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 *
|
||||
@ -45,7 +45,7 @@
|
||||
#include <sys/termio.h> /* needed for ISC */
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_initscr.c,v 1.39 2009/02/14 20:55:49 tom Exp $")
|
||||
MODULE_ID("$Id: lib_initscr.c,v 1.40 2014/04/26 18:47:51 juergen Exp $")
|
||||
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
initscr(void)
|
||||
@ -75,9 +75,9 @@ initscr(void)
|
||||
* core when attempting to write to stdout. Opening /dev/tty
|
||||
* explicitly seems to fix the problem.
|
||||
*/
|
||||
if (isatty(fileno(stdout))) {
|
||||
if (NC_ISATTY(fileno(stdout))) {
|
||||
FILE *fp = fopen("/dev/tty", "w");
|
||||
if (fp != 0 && isatty(fileno(fp))) {
|
||||
if (fp != 0 && NC_ISATTY(fileno(fp))) {
|
||||
fclose(stdout);
|
||||
dup2(fileno(fp), STDOUT_FILENO);
|
||||
stdout = fdopen(STDOUT_FILENO, "w");
|
||||
|
@ -84,7 +84,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_mouse.c,v 1.142 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_mouse.c,v 1.143 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
@ -408,7 +408,7 @@ allow_gpm_mouse(SCREEN *sp)
|
||||
} else
|
||||
#endif
|
||||
/* GPM does printf's without checking if stdout is a terminal */
|
||||
if (isatty(fileno(stdout))) {
|
||||
if (NC_ISATTY(fileno(stdout))) {
|
||||
char *list = getenv("NCURSES_GPM_TERMS");
|
||||
char *env = getenv("TERM");
|
||||
if (list != 0) {
|
||||
@ -607,7 +607,7 @@ initialize_mousetype(SCREEN *sp)
|
||||
struct mouse_info the_mouse;
|
||||
char *the_device = 0;
|
||||
|
||||
if (isatty(sp->_ifd))
|
||||
if (NC_ISATTY(sp->_ifd))
|
||||
the_device = ttyname(sp->_ifd);
|
||||
if (the_device == 0)
|
||||
the_device = "/dev/tty";
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: lib_newterm.c,v 1.91 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_newterm.c,v 1.92 2014/04/26 18:00:39 tom Exp $")
|
||||
|
||||
#ifdef USE_TERM_DRIVER
|
||||
#define NumLabels InfoOf(SP_PARM).numlabels
|
||||
@ -200,9 +200,6 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
|
||||
INIT_TERM_DRIVER();
|
||||
/* this loads the capability entry, then sets LINES and COLS */
|
||||
if (
|
||||
#if NCURSES_SP_FUNCS
|
||||
SP_PARM->_prescreen &&
|
||||
#endif
|
||||
TINFO_SETUP_TERM(&new_term, name,
|
||||
fileno(_ofp), &errret, FALSE) != ERR) {
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id: curses.priv.h,v 1.533 2014/04/13 00:16:21 tom Exp $
|
||||
* $Id: curses.priv.h,v 1.535 2014/04/26 18:45:36 juergen Exp $
|
||||
*
|
||||
* curses.priv.h
|
||||
*
|
||||
@ -2350,6 +2350,8 @@ extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
|
||||
#ifdef __MINGW32__
|
||||
#include <nc_mingw.h>
|
||||
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);
|
||||
#endif
|
||||
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
|
||||
#endif
|
||||
@ -2461,6 +2463,12 @@ 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2013,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 *
|
||||
@ -79,7 +79,7 @@
|
||||
#undef USE_OLD_TTY
|
||||
#endif /* USE_OLD_TTY */
|
||||
|
||||
MODULE_ID("$Id: lib_baudrate.c,v 1.34 2013/12/15 01:29:02 tom Exp $")
|
||||
MODULE_ID("$Id: lib_baudrate.c,v 1.35 2014/04/26 18:48:19 juergen Exp $")
|
||||
|
||||
/*
|
||||
* int
|
||||
@ -208,7 +208,7 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
|
||||
*/
|
||||
#ifdef TRACE
|
||||
if (IsValidTIScreen(SP_PARM)
|
||||
&& !isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
|
||||
&& !NC_ISATTY(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
|
||||
&& getenv("BAUDRATE") != 0) {
|
||||
int ret;
|
||||
if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_setup.c,v 1.159 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_setup.c,v 1.160 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -321,7 +321,7 @@ _nc_get_screensize(SCREEN *sp,
|
||||
#endif
|
||||
#if HAVE_SIZECHANGE
|
||||
/* try asking the OS */
|
||||
if (isatty(cur_term->Filedes)) {
|
||||
if (NC_ISATTY(cur_term->Filedes)) {
|
||||
STRUCT_WINSIZE size;
|
||||
|
||||
errno = 0;
|
||||
@ -655,7 +655,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
|
||||
* Allow output redirection. This is what SVr3 does. If stdout is
|
||||
* directed to a file, screen updates go to standard error.
|
||||
*/
|
||||
if (Filedes == STDOUT_FILENO && !isatty(Filedes))
|
||||
if (Filedes == STDOUT_FILENO && !NC_ISATTY(Filedes))
|
||||
Filedes = STDERR_FILENO;
|
||||
|
||||
/*
|
||||
@ -752,7 +752,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
|
||||
* _nc_setupscreen(). Do it now anyway, so we can initialize the
|
||||
* baudrate.
|
||||
*/
|
||||
if (isatty(Filedes)) {
|
||||
if (NC_ISATTY(Filedes)) {
|
||||
def_prog_mode();
|
||||
baudrate();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_ttyflags.c,v 1.29 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_ttyflags.c,v 1.30 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
NCURSES_EXPORT(int)
|
||||
NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
|
||||
@ -107,7 +107,7 @@ NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_DCLx TTY * buf)
|
||||
for (;;) {
|
||||
if ((SET_TTY(termp->Filedes, buf) != 0)
|
||||
#if USE_KLIBC_KBD
|
||||
&& !isatty(termp->Filedes)
|
||||
&& !NC_ISATTY(termp->Filedes)
|
||||
#endif
|
||||
) {
|
||||
if (errno == EINTR)
|
||||
|
@ -50,7 +50,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: tinfo_driver.c,v 1.37 2014/04/13 00:17:08 tom Exp $")
|
||||
MODULE_ID("$Id: tinfo_driver.c,v 1.38 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
/*
|
||||
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
|
||||
@ -385,7 +385,7 @@ drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *linep, int *colp)
|
||||
/* try asking the OS */
|
||||
{
|
||||
TERMINAL *termp = (TERMINAL *) TCB;
|
||||
if (isatty(termp->Filedes)) {
|
||||
if (NC_ISATTY(termp->Filedes)) {
|
||||
STRUCT_WINSIZE size;
|
||||
|
||||
errno = 0;
|
||||
@ -671,7 +671,7 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
* _nc_setupscreen(). Do it now anyway, so we can initialize the
|
||||
* baudrate.
|
||||
*/
|
||||
if (isatty(trm->Filedes)) {
|
||||
if (NC_ISATTY(trm->Filedes)) {
|
||||
TCB->drv->td_mode(TCB, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2010,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 *
|
||||
@ -73,7 +73,7 @@ AUTHOR
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: hashmap.c,v 1.63 2011/10/22 16:34:50 tom Exp $")
|
||||
MODULE_ID("$Id: hashmap.c,v 1.64 2014/04/26 18:48:44 juergen Exp $")
|
||||
|
||||
#ifdef HASHDEBUG
|
||||
|
||||
@ -492,7 +492,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
CharOf(oldtext[n][0]) = CharOf(newtext[n][0]) = '.';
|
||||
}
|
||||
|
||||
if (isatty(fileno(stdin)))
|
||||
if (NC_ISATTY(fileno(stdin)))
|
||||
usage();
|
||||
|
||||
#ifdef TRACE
|
||||
|
@ -159,7 +159,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_mvcur.c,v 1.134 2014/03/08 20:32:59 tom Exp $")
|
||||
MODULE_ID("$Id: lib_mvcur.c,v 1.135 2014/04/26 18:47:20 juergen Exp $")
|
||||
|
||||
#define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x] /* desired state */
|
||||
|
||||
@ -327,7 +327,7 @@ NCURSES_EXPORT(void)
|
||||
NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0)
|
||||
/* initialize the cost structure */
|
||||
{
|
||||
if (SP_PARM->_ofp && isatty(fileno(SP_PARM->_ofp))) {
|
||||
if (SP_PARM->_ofp && NC_ISATTY(fileno(SP_PARM->_ofp))) {
|
||||
SP_PARM->_char_padding = ((BAUDBYTE * 1000 * 10)
|
||||
/ (BAUDRATE(SP_PARM) > 0
|
||||
? BAUDRATE(SP_PARM)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2013,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 *
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
#include <SigAction.h>
|
||||
|
||||
MODULE_ID("$Id: lib_tstp.c,v 1.47 2013/04/27 19:50:17 tom Exp $")
|
||||
MODULE_ID("$Id: lib_tstp.c,v 1.48 2014/04/26 18:47:35 juergen Exp $")
|
||||
|
||||
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
|
||||
#define USE_SIGTSTP 1
|
||||
@ -267,7 +267,7 @@ handle_SIGINT(int sig)
|
||||
SCREEN *scan;
|
||||
for (each_screen(scan)) {
|
||||
if (scan->_ofp != 0
|
||||
&& isatty(fileno(scan->_ofp))) {
|
||||
&& NC_ISATTY(fileno(scan->_ofp))) {
|
||||
scan->_outch = NCURSES_SP_NAME(_nc_outch);
|
||||
}
|
||||
set_term(scan);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2008,2010 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2008-2010,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 *
|
||||
@ -26,13 +26,16 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef WINVER
|
||||
# undef WINVER
|
||||
#endif
|
||||
#define WINVER 0x0501
|
||||
|
||||
#include <curses.priv.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
MODULE_ID("$Id: gettimeofday.c,v 1.2 2010/01/16 15:18:51 tom Exp $")
|
||||
MODULE_ID("$Id: gettimeofday.c,v 1.3 2014/04/26 19:41:34 juergen Exp $")
|
||||
|
||||
#define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <curses.priv.h>
|
||||
#define CUR my_term.type.
|
||||
|
||||
MODULE_ID("$Id: win_driver.c,v 1.31 2014/04/13 00:16:07 tom Exp $")
|
||||
MODULE_ID("$Id: win_driver.c,v 1.33 2014/04/26 19:32:05 juergen Exp $")
|
||||
|
||||
#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
|
||||
|
||||
@ -71,6 +71,7 @@ static const LONG keylist[] =
|
||||
#define FKEYS 24
|
||||
#define MAPSIZE (FKEYS + N_INI)
|
||||
#define NUMPAIRS 64
|
||||
#define HANDLE_CAST(f) (HANDLE)(intptr_t)(f)
|
||||
|
||||
typedef struct props {
|
||||
CONSOLE_SCREEN_BUFFER_INFO SBI;
|
||||
@ -87,6 +88,111 @@ typedef struct props {
|
||||
|
||||
#define PropOf(TCB) ((Properties*)TCB->prop)
|
||||
|
||||
#if WINVER >= 0x0600
|
||||
/* This function tests, whether or not the ncurses application
|
||||
is running as a descendant of MSYS2/cygwin mintty terminal
|
||||
application. mintty doesn't use Windows Console for it's screen
|
||||
I/O, so the native Windows _isatty doesn't recognize it as
|
||||
character device. But we can discover we are at the end of an
|
||||
Pipe and can query to server side of the pipe, looking whether
|
||||
or not this is mintty.
|
||||
*/
|
||||
static int
|
||||
_ismintty(int fd, LPHANDLE pMinTTY)
|
||||
{
|
||||
HANDLE handle;
|
||||
DWORD dw;
|
||||
|
||||
handle = HANDLE_CAST(_get_osfhandle(fd));
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
return 0;
|
||||
|
||||
dw = GetFileType(handle);
|
||||
if (dw == FILE_TYPE_PIPE) {
|
||||
if (GetNamedPipeInfo(handle, 0, 0, 0, 0)) {
|
||||
ULONG pPid;
|
||||
/* Requires NT6 */
|
||||
if (GetNamedPipeServerProcessId(handle, &pPid)) {
|
||||
TCHAR buf[MAX_PATH];
|
||||
DWORD len = 0;
|
||||
/* These security attributes may allow us to
|
||||
create a remote thread in mintty to manipulate
|
||||
the terminal state remotely */
|
||||
HANDLE pHandle = OpenProcess(PROCESS_CREATE_THREAD
|
||||
| PROCESS_QUERY_INFORMATION
|
||||
| PROCESS_VM_OPERATION
|
||||
| PROCESS_VM_WRITE
|
||||
| PROCESS_VM_READ,
|
||||
FALSE,
|
||||
pPid);
|
||||
if (pMinTTY)
|
||||
*pMinTTY = INVALID_HANDLE_VALUE;
|
||||
if (pHandle == INVALID_HANDLE_VALUE)
|
||||
return 0;
|
||||
if (len = GetProcessImageFileName(pHandle,
|
||||
buf,
|
||||
(DWORD) (sizeof(buf) /
|
||||
sizeof(*buf)))) {
|
||||
TCHAR *pos = _tcsrchr(buf, _T('\\'));
|
||||
if (pos) {
|
||||
pos++;
|
||||
if (_tcsnicmp(pos, _TEXT("mintty.exe"), 10) == 0) {
|
||||
if (pMinTTY)
|
||||
*pMinTTY = pHandle;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Our replacement for the systems _isatty to include also
|
||||
a test for mintty. This is called from the NC_ISATTY macro
|
||||
defined in curses.priv.h
|
||||
*/
|
||||
int
|
||||
_nc_mingw_isatty(int fd)
|
||||
{
|
||||
if (_isatty(fd))
|
||||
return 1;
|
||||
#if WINVER < 0x0600
|
||||
return 0;
|
||||
#else
|
||||
return _ismintty(fd, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Borrowed from ansicon project.
|
||||
Check whether or not a I/O handle is associated with
|
||||
a Windows console.
|
||||
*/
|
||||
static BOOL
|
||||
IsConsoleHandle(HANDLE hdl)
|
||||
{
|
||||
DWORD dwFlag = 0;
|
||||
if (!GetConsoleMode(hdl, &dwFlag)) {
|
||||
return (int) WriteConsoleA(hdl, NULL, 0, &dwFlag, NULL);
|
||||
}
|
||||
return (int) (dwFlag & ENABLE_PROCESSED_OUTPUT);
|
||||
}
|
||||
|
||||
/* This is used when running in terminfo mode to discover,
|
||||
whether or not the "terminal" is actually a Windows
|
||||
Console. It's the responsibilty of the console to deal
|
||||
with the terminal escape sequences that are sent by
|
||||
terminfo.
|
||||
*/
|
||||
int
|
||||
_nc_mingw_isconsole(int fd)
|
||||
{
|
||||
HANDLE hdl = HANDLE_CAST(_get_osfhandle(fd));
|
||||
return (int) IsConsoleHandle(hdl);
|
||||
}
|
||||
|
||||
int
|
||||
_nc_mingw_ioctl(int fd GCC_UNUSED,
|
||||
long int request GCC_UNUSED,
|
||||
@ -380,14 +486,14 @@ restore_original_screen(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static const char *
|
||||
drv_name(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_name(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
(void) TCB;
|
||||
return "win32console";
|
||||
}
|
||||
|
||||
static int
|
||||
drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
int result = ERR;
|
||||
int y, nonempty, n, x0, x1, Width, Height;
|
||||
@ -396,7 +502,7 @@ drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
AssertTCB();
|
||||
SetSP();
|
||||
|
||||
T((T_CALLED("win32con::drv_doupdate(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_doupdate(%p)"), TCB));
|
||||
if (okConsoleHandle(TCB)) {
|
||||
|
||||
Width = screen_columns(sp);
|
||||
@ -507,13 +613,13 @@ drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static bool
|
||||
drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
const char *tname,
|
||||
int *errret GCC_UNUSED)
|
||||
wcon_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
const char *tname,
|
||||
int *errret GCC_UNUSED)
|
||||
{
|
||||
bool code = FALSE;
|
||||
|
||||
T((T_CALLED("win32con::drv_CanHandle(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_CanHandle(%p)"), TCB));
|
||||
|
||||
assert((TCB != 0) && (tname != 0));
|
||||
|
||||
@ -549,8 +655,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static int
|
||||
drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int beepFlag GCC_UNUSED)
|
||||
wcon_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int beepFlag GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
int res = ERR;
|
||||
@ -562,9 +668,9 @@ drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static int
|
||||
drv_print(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
char *data GCC_UNUSED,
|
||||
int len GCC_UNUSED)
|
||||
wcon_print(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
char *data GCC_UNUSED,
|
||||
int len GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -575,9 +681,9 @@ drv_print(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static int
|
||||
drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int fg GCC_UNUSED,
|
||||
int bg GCC_UNUSED)
|
||||
wcon_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int fg GCC_UNUSED,
|
||||
int bg GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
int code = ERR;
|
||||
@ -624,10 +730,10 @@ get_SBI(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int fore,
|
||||
int color,
|
||||
int (*outc) (SCREEN *, int) GCC_UNUSED)
|
||||
wcon_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int fore,
|
||||
int color,
|
||||
int (*outc) (SCREEN *, int) GCC_UNUSED)
|
||||
{
|
||||
AssertTCB();
|
||||
|
||||
@ -641,7 +747,7 @@ drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static bool
|
||||
drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_rescol(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
bool res = FALSE;
|
||||
|
||||
@ -656,7 +762,7 @@ drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static bool
|
||||
drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
int result = FALSE;
|
||||
SCREEN *sp;
|
||||
@ -668,13 +774,13 @@ drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols)
|
||||
wcon_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols)
|
||||
{
|
||||
int result = ERR;
|
||||
|
||||
AssertTCB();
|
||||
|
||||
T((T_CALLED("win32con::drv_size(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_size(%p)"), TCB));
|
||||
|
||||
if (okConsoleHandle(TCB) &&
|
||||
PropOf(TCB) != 0 &&
|
||||
@ -695,16 +801,16 @@ drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_setsize(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED,
|
||||
int l GCC_UNUSED,
|
||||
int c GCC_UNUSED)
|
||||
wcon_setsize(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED,
|
||||
int l GCC_UNUSED,
|
||||
int c GCC_UNUSED)
|
||||
{
|
||||
AssertTCB();
|
||||
return ERR;
|
||||
}
|
||||
|
||||
static int
|
||||
drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, int setFlag, TTY * buf)
|
||||
wcon_sgmode(TERMINAL_CONTROL_BLOCK * TCB, int setFlag, TTY * buf)
|
||||
{
|
||||
DWORD dwFlag = 0;
|
||||
tcflag_t iflag;
|
||||
@ -771,7 +877,7 @@ drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, int setFlag, TTY * buf)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
wcon_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
{
|
||||
SCREEN *sp;
|
||||
TERMINAL *_term = (TERMINAL *) TCB;
|
||||
@ -780,20 +886,20 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
AssertTCB();
|
||||
sp = TCB->csp;
|
||||
|
||||
T((T_CALLED("win32con::drv_mode(%p, prog=%d, def=%d)"), TCB, progFlag, defFlag));
|
||||
T((T_CALLED("win32con::wcon_mode(%p, prog=%d, def=%d)"), TCB, progFlag, defFlag));
|
||||
PropOf(TCB)->progMode = progFlag;
|
||||
PropOf(TCB)->lastOut = progFlag ? TCB->hdl : TCB->out;
|
||||
SetConsoleActiveScreenBuffer(PropOf(TCB)->lastOut);
|
||||
|
||||
if (progFlag) /* prog mode */ {
|
||||
if (defFlag) {
|
||||
if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
|
||||
if ((wcon_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
|
||||
_term->Nttyb.c_oflag &= (tcflag_t) (~OFLAGS_TABS);
|
||||
code = OK;
|
||||
}
|
||||
} else {
|
||||
/* reset_prog_mode */
|
||||
if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
|
||||
if (wcon_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
|
||||
if (sp) {
|
||||
if (sp->_keypad_on)
|
||||
_nc_keypad(sp, TRUE);
|
||||
@ -804,7 +910,7 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
} else { /* shell mode */
|
||||
if (defFlag) {
|
||||
/* def_shell_mode */
|
||||
if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
|
||||
if (wcon_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
|
||||
code = OK;
|
||||
}
|
||||
} else {
|
||||
@ -813,7 +919,7 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
_nc_keypad(sp, FALSE);
|
||||
NCURSES_SP_NAME(_nc_flush) (sp);
|
||||
}
|
||||
code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
|
||||
code = wcon_sgmode(TCB, TRUE, &(_term->Ottyb));
|
||||
if (!PropOf(TCB)->buffered) {
|
||||
if (!restore_original_screen(TCB))
|
||||
code = ERR;
|
||||
@ -825,12 +931,12 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_screen_init(SCREEN *sp GCC_UNUSED)
|
||||
wcon_screen_init(SCREEN *sp GCC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
drv_wrap(SCREEN *sp GCC_UNUSED)
|
||||
wcon_wrap(SCREEN *sp GCC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
@ -878,9 +984,9 @@ MapKey(TERMINAL_CONTROL_BLOCK * TCB, WORD vKey)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_release(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_release(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
T((T_CALLED("win32con::drv_release(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_release(%p)"), TCB));
|
||||
|
||||
AssertTCB();
|
||||
if (TCB->prop)
|
||||
@ -977,11 +1083,11 @@ save_original_screen(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_init(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_init(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
DWORD num_buttons;
|
||||
|
||||
T((T_CALLED("win32con::drv_init(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_init(%p)"), TCB));
|
||||
|
||||
AssertTCB();
|
||||
|
||||
@ -1014,12 +1120,12 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
PropOf(TCB)->buffered = buffered;
|
||||
PropOf(TCB)->window_only = FALSE;
|
||||
if (!get_SBI(TCB)) {
|
||||
FreeAndNull(TCB->prop); /* force error in drv_size */
|
||||
FreeAndNull(TCB->prop); /* force error in wcon_size */
|
||||
returnVoid;
|
||||
}
|
||||
if (!buffered) {
|
||||
if (!save_original_screen(TCB)) {
|
||||
FreeAndNull(TCB->prop); /* force error in drv_size */
|
||||
FreeAndNull(TCB->prop); /* force error in wcon_size */
|
||||
returnVoid;
|
||||
}
|
||||
}
|
||||
@ -1071,10 +1177,10 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_initpair(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int pair,
|
||||
int f,
|
||||
int b)
|
||||
wcon_initpair(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int pair,
|
||||
int f,
|
||||
int b)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1088,11 +1194,11 @@ drv_initpair(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static void
|
||||
drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int color GCC_UNUSED,
|
||||
int r GCC_UNUSED,
|
||||
int g GCC_UNUSED,
|
||||
int b GCC_UNUSED)
|
||||
wcon_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int color GCC_UNUSED,
|
||||
int r GCC_UNUSED,
|
||||
int g GCC_UNUSED,
|
||||
int b GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1101,11 +1207,11 @@ drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static void
|
||||
drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int old_pair GCC_UNUSED,
|
||||
int pair GCC_UNUSED,
|
||||
int reverse GCC_UNUSED,
|
||||
int (*outc) (SCREEN *, int) GCC_UNUSED
|
||||
wcon_do_color(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int old_pair GCC_UNUSED,
|
||||
int pair GCC_UNUSED,
|
||||
int reverse GCC_UNUSED,
|
||||
int (*outc) (SCREEN *, int) GCC_UNUSED
|
||||
)
|
||||
{
|
||||
SCREEN *sp;
|
||||
@ -1115,7 +1221,7 @@ drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static void
|
||||
drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1126,7 +1232,7 @@ drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
|
||||
wcon_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
|
||||
{
|
||||
int rc = 0;
|
||||
SCREEN *sp;
|
||||
@ -1148,9 +1254,9 @@ drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int yold GCC_UNUSED, int xold GCC_UNUSED,
|
||||
int y, int x)
|
||||
wcon_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int yold GCC_UNUSED, int xold GCC_UNUSED,
|
||||
int y, int x)
|
||||
{
|
||||
int ret = ERR;
|
||||
if (okConsoleHandle(TCB)) {
|
||||
@ -1165,9 +1271,9 @@ drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static void
|
||||
drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int labnum GCC_UNUSED,
|
||||
char *text GCC_UNUSED)
|
||||
wcon_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int labnum GCC_UNUSED,
|
||||
char *text GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1176,8 +1282,8 @@ drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static void
|
||||
drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int OnFlag GCC_UNUSED)
|
||||
wcon_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int OnFlag GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1186,7 +1292,7 @@ drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
}
|
||||
|
||||
static chtype
|
||||
drv_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
|
||||
wcon_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
|
||||
{
|
||||
chtype res = A_NORMAL;
|
||||
res |= (A_BOLD | A_DIM | A_REVERSE | A_STANDOUT | A_COLOR);
|
||||
@ -1194,7 +1300,7 @@ drv_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
wcon_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
{
|
||||
SCREEN *sp;
|
||||
|
||||
@ -1203,9 +1309,9 @@ drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
|
||||
}
|
||||
|
||||
static void
|
||||
drv_initacs(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
chtype *real_map GCC_UNUSED,
|
||||
chtype *fake_map GCC_UNUSED)
|
||||
wcon_initacs(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
chtype *real_map GCC_UNUSED,
|
||||
chtype *fake_map GCC_UNUSED)
|
||||
{
|
||||
#define DATA(a,b) { a, b }
|
||||
static struct {
|
||||
@ -1321,11 +1427,11 @@ decode_mouse(TERMINAL_CONTROL_BLOCK * TCB, int mask)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int mode,
|
||||
int milliseconds,
|
||||
int *timeleft
|
||||
EVENTLIST_2nd(_nc_eventlist * evl))
|
||||
wcon_twait(TERMINAL_CONTROL_BLOCK * TCB,
|
||||
int mode,
|
||||
int milliseconds,
|
||||
int *timeleft
|
||||
EVENTLIST_2nd(_nc_eventlist * evl))
|
||||
{
|
||||
SCREEN *sp;
|
||||
INPUT_RECORD inp_rec;
|
||||
@ -1473,7 +1579,7 @@ handle_mouse(TERMINAL_CONTROL_BLOCK * TCB, MOUSE_EVENT_RECORD mer)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
|
||||
wcon_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
|
||||
{
|
||||
SCREEN *sp;
|
||||
int n = 1;
|
||||
@ -1488,7 +1594,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
|
||||
|
||||
memset(&inp_rec, 0, sizeof(inp_rec));
|
||||
|
||||
T((T_CALLED("win32con::drv_read(%p)"), TCB));
|
||||
T((T_CALLED("win32con::wcon_read(%p)"), TCB));
|
||||
while ((b = ReadConsoleInput(TCB->inp, &inp_rec, 1, &nRead))) {
|
||||
if (b && nRead > 0) {
|
||||
if (inp_rec.EventType == KEY_EVENT) {
|
||||
@ -1521,15 +1627,15 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
|
||||
wcon_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
|
||||
{
|
||||
T((T_CALLED("win32con::drv_nap(%p, %d)"), TCB, ms));
|
||||
T((T_CALLED("win32con::wcon_nap(%p, %d)"), TCB, ms));
|
||||
Sleep((DWORD) ms);
|
||||
returnCode(OK);
|
||||
}
|
||||
|
||||
static bool
|
||||
drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
|
||||
wcon_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
|
||||
{
|
||||
SCREEN *sp;
|
||||
WORD nKey;
|
||||
@ -1542,7 +1648,7 @@ drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
|
||||
|
||||
AssertTCB();
|
||||
|
||||
T((T_CALLED("win32con::drv_kyExist(%p, %d)"), TCB, keycode));
|
||||
T((T_CALLED("win32con::wcon_kyExist(%p, %d)"), TCB, keycode));
|
||||
res = bsearch(&key,
|
||||
PropOf(TCB)->rmap,
|
||||
(size_t) (N_INI + FKEYS),
|
||||
@ -1558,7 +1664,7 @@ drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, int flag GCC_UNUSED)
|
||||
wcon_kpad(TERMINAL_CONTROL_BLOCK * TCB, int flag GCC_UNUSED)
|
||||
{
|
||||
SCREEN *sp;
|
||||
int code = ERR;
|
||||
@ -1566,7 +1672,7 @@ drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, int flag GCC_UNUSED)
|
||||
AssertTCB();
|
||||
sp = TCB->csp;
|
||||
|
||||
T((T_CALLED("win32con::drv_kpad(%p, %d)"), TCB, flag));
|
||||
T((T_CALLED("win32con::wcon_kpad(%p, %d)"), TCB, flag));
|
||||
if (sp) {
|
||||
code = OK;
|
||||
}
|
||||
@ -1574,7 +1680,7 @@ drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, int flag GCC_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, int flag)
|
||||
wcon_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, int flag)
|
||||
{
|
||||
int code = ERR;
|
||||
SCREEN *sp;
|
||||
@ -1586,7 +1692,7 @@ drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, int flag)
|
||||
AssertTCB();
|
||||
SetSP();
|
||||
|
||||
T((T_CALLED("win32con::drv_keyok(%p, %d, %d)"), TCB, keycode, flag));
|
||||
T((T_CALLED("win32con::wcon_keyok(%p, %d, %d)"), TCB, keycode, flag));
|
||||
if (sp) {
|
||||
res = bsearch(&key,
|
||||
PropOf(TCB)->rmap,
|
||||
@ -1607,39 +1713,39 @@ drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, int flag)
|
||||
|
||||
NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_WIN_DRIVER = {
|
||||
FALSE,
|
||||
drv_name, /* Name */
|
||||
drv_CanHandle, /* CanHandle */
|
||||
drv_init, /* init */
|
||||
drv_release, /* release */
|
||||
drv_size, /* size */
|
||||
drv_sgmode, /* sgmode */
|
||||
drv_conattr, /* conattr */
|
||||
drv_mvcur, /* hwcur */
|
||||
drv_mode, /* mode */
|
||||
drv_rescol, /* rescol */
|
||||
drv_rescolors, /* rescolors */
|
||||
drv_setcolor, /* color */
|
||||
drv_dobeepflash, /* DoBeepFlash */
|
||||
drv_initpair, /* initpair */
|
||||
drv_initcolor, /* initcolor */
|
||||
drv_do_color, /* docolor */
|
||||
drv_initmouse, /* initmouse */
|
||||
drv_testmouse, /* testmouse */
|
||||
drv_setfilter, /* setfilter */
|
||||
drv_hwlabel, /* hwlabel */
|
||||
drv_hwlabelOnOff, /* hwlabelOnOff */
|
||||
drv_doupdate, /* update */
|
||||
drv_defaultcolors, /* defaultcolors */
|
||||
drv_print, /* print */
|
||||
drv_size, /* getsize */
|
||||
drv_setsize, /* setsize */
|
||||
drv_initacs, /* initacs */
|
||||
drv_screen_init, /* scinit */
|
||||
drv_wrap, /* scexit */
|
||||
drv_twait, /* twait */
|
||||
drv_read, /* read */
|
||||
drv_nap, /* nap */
|
||||
drv_kpad, /* kpad */
|
||||
drv_keyok, /* kyOk */
|
||||
drv_kyExist /* kyExist */
|
||||
wcon_name, /* Name */
|
||||
wcon_CanHandle, /* CanHandle */
|
||||
wcon_init, /* init */
|
||||
wcon_release, /* release */
|
||||
wcon_size, /* size */
|
||||
wcon_sgmode, /* sgmode */
|
||||
wcon_conattr, /* conattr */
|
||||
wcon_mvcur, /* hwcur */
|
||||
wcon_mode, /* mode */
|
||||
wcon_rescol, /* rescol */
|
||||
wcon_rescolors, /* rescolors */
|
||||
wcon_setcolor, /* color */
|
||||
wcon_dobeepflash, /* DoBeepFlash */
|
||||
wcon_initpair, /* initpair */
|
||||
wcon_initcolor, /* initcolor */
|
||||
wcon_do_color, /* docolor */
|
||||
wcon_initmouse, /* initmouse */
|
||||
wcon_testmouse, /* testmouse */
|
||||
wcon_setfilter, /* setfilter */
|
||||
wcon_hwlabel, /* hwlabel */
|
||||
wcon_hwlabelOnOff, /* hwlabelOnOff */
|
||||
wcon_doupdate, /* update */
|
||||
wcon_defaultcolors, /* defaultcolors */
|
||||
wcon_print, /* print */
|
||||
wcon_size, /* getsize */
|
||||
wcon_setsize, /* setsize */
|
||||
wcon_initacs, /* initacs */
|
||||
wcon_screen_init, /* scinit */
|
||||
wcon_wrap, /* scexit */
|
||||
wcon_twait, /* twait */
|
||||
wcon_read, /* read */
|
||||
wcon_nap, /* nap */
|
||||
wcon_kpad, /* kpad */
|
||||
wcon_keyok, /* kyOk */
|
||||
wcon_kyExist /* kyExist */
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (5.9-20140419) unstable; urgency=low
|
||||
ncurses6 (5.9-20140426) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 19 Apr 2014 12:03:50 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (5.9-20140419) unstable; urgency=low
|
||||
ncurses6 (5.9-20140426) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 19 Apr 2014 12:03:50 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (5.9-20140419) unstable; urgency=low
|
||||
ncurses6 (5.9-20140426) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 19 Apr 2014 12:03:50 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Apr 2014 10:41:17 -0400
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $Id: mingw-ncurses.nsi,v 1.37 2014/04/19 16:03:50 tom Exp $
|
||||
; $Id: mingw-ncurses.nsi,v 1.38 2014/04/26 14:41:17 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 "0419"
|
||||
!define VERSION_MMDD "0426"
|
||||
!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: 5.9
|
||||
Release: 20140419
|
||||
Release: 20140426
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Version: 5.9
|
||||
Release: 20140419
|
||||
Release: 20140426
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
Loading…
Reference in New Issue
Block a user