mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-12-21 07:39:06 +08:00
ncurses 5.9 - patch 20120707
+ add ncurses_mingw.h to installed headers (prompted by patch by Juergen Pfeifer). + clarify return-codes from wgetch() in response to SIGWINCH (prompted by Novell #769788). + modify resizeterm() to always push a KEY_RESIZE onto the fifo, even if screensize is unchanged. Modify _nc_update_screensize() to push a KEY_RESIZE if there was a SIGWINCH, even if it does not call resizeterm(). These changes eliminate the case where a SIGWINCH is received, but ERR returned from wgetch or wgetnstr because the screen dimensions did not change (Novell #769788).
This commit is contained in:
parent
cc0205ede8
commit
471bc00736
14
NEWS
14
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.1923 2012/06/30 23:05:08 tom Exp $
|
||||
-- $Id: NEWS,v 1.1926 2012/07/07 19:59:58 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.
|
||||
|
||||
20120707
|
||||
+ add ncurses_mingw.h to installed headers (prompted by patch by
|
||||
Juergen Pfeifer).
|
||||
+ clarify return-codes from wgetch() in response to SIGWINCH (prompted
|
||||
by Novell #769788).
|
||||
+ modify resizeterm() to always push a KEY_RESIZE onto the fifo, even
|
||||
if screensize is unchanged. Modify _nc_update_screensize() to push a
|
||||
KEY_RESIZE if there was a SIGWINCH, even if it does not call
|
||||
resizeterm(). These changes eliminate the case where a SIGWINCH is
|
||||
received, but ERR returned from wgetch or wgetnstr because the screen
|
||||
dimensions did not change (Novell #769788).
|
||||
|
||||
20120630
|
||||
+ add --enable-interop to sample package scripts (suggested by Juergen
|
||||
Pfeifer).
|
||||
|
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.880 2012/06/30 16:22:52 tom Exp $
|
||||
# $Id: dist.mk,v 1.881 2012/07/07 16:02:13 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 = 20120630
|
||||
NCURSES_PATCH = 20120707
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# $Id: headers,v 1.10 2009/09/05 17:46:30 tom Exp $
|
||||
# $Id: headers,v 1.11 2012/07/07 19:58:24 tom Exp $
|
||||
##############################################################################
|
||||
# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. #
|
||||
# Copyright (c) 1998-2009,2012 Free Software Foundation, Inc. #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a #
|
||||
# copy of this software and associated documentation files (the "Software"), #
|
||||
@ -29,14 +29,23 @@
|
||||
#
|
||||
# Author: Thomas E. Dickey 1996-on
|
||||
#
|
||||
term.h
|
||||
curses.h
|
||||
unctrl.h
|
||||
termcap.h
|
||||
ncurses_dll.h
|
||||
|
||||
# Support for termcap (and tic, etc.), which can be a separate library
|
||||
@ termlib
|
||||
term.h
|
||||
termcap.h
|
||||
|
||||
# Headers used only for tic, other programs using internal interfaces
|
||||
@ ticlib
|
||||
$(srcdir)/tic.h
|
||||
$(srcdir)/term_entry.h
|
||||
$(srcdir)/nc_tparm.h
|
||||
|
||||
# Porting
|
||||
@ port_win32con
|
||||
ncurses_mingw.h
|
||||
|
||||
# vile:makemode
|
||||
|
@ -1,6 +1,6 @@
|
||||
'\" t
|
||||
.\"***************************************************************************
|
||||
.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
|
||||
.\" Copyright (c) 1998-2011,2012 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 *
|
||||
@ -27,7 +27,7 @@
|
||||
.\" authorization. *
|
||||
.\"***************************************************************************
|
||||
.\"
|
||||
.\" $Id: curs_getch.3x,v 1.36 2011/01/22 19:38:51 tom Exp $
|
||||
.\" $Id: curs_getch.3x,v 1.37 2012/07/07 20:04:56 tom Exp $
|
||||
.TH curs_getch 3X ""
|
||||
.na
|
||||
.hy 0
|
||||
@ -237,14 +237,14 @@ See \fBresizeterm\fR(3X) for more details about \fBKEY_RESIZE\fP, and
|
||||
All routines return the integer \fBERR\fR upon failure and an integer value
|
||||
other than \fBERR\fR (\fBOK\fR in the case of ungetch()) upon successful
|
||||
completion.
|
||||
.RS
|
||||
.RS 3
|
||||
.TP 5
|
||||
\fBungetch\fP
|
||||
returns an error
|
||||
returns ERR
|
||||
if there is no more room in the FIFO.
|
||||
.TP 5
|
||||
.TP
|
||||
\fBwgetch\fP
|
||||
returns an error
|
||||
returns ERR
|
||||
if the window pointer is null, or
|
||||
if its timeout expires without having any data.
|
||||
.RE
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\"***************************************************************************
|
||||
.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
|
||||
.\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
|
||||
.\" *
|
||||
.\" Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
.\" copy of this software and associated documentation files (the *
|
||||
@ -28,7 +28,7 @@
|
||||
.\"
|
||||
.\" Author: Thomas E. Dickey 1996-2005
|
||||
.\"
|
||||
.\" $Id: resizeterm.3x,v 1.14 2010/12/04 18:38:55 tom Exp $
|
||||
.\" $Id: resizeterm.3x,v 1.15 2012/07/07 18:38:21 tom Exp $
|
||||
.TH resizeterm 3X ""
|
||||
.SH NAME
|
||||
\fBis_term_resized\fR,
|
||||
@ -86,8 +86,6 @@ this overrides the library's use of the window size obtained from
|
||||
the operating system.
|
||||
Thus, even if a SIGWINCH is received,
|
||||
no screen size change may be recorded.
|
||||
In that case, no \fBKEY_RESIZE\fP is queued for the next call to \fBgetch\fP;
|
||||
an \fBERR\fP will be returned instead.
|
||||
.SH SEE ALSO
|
||||
\fBcurs_variables\fR(3X),
|
||||
\fBwresize\fR(3X).
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2011,2012 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 *
|
||||
@ -47,7 +47,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_set_term.c,v 1.140 2011/10/22 16:10:43 tom Exp $")
|
||||
MODULE_ID("$Id: lib_set_term.c,v 1.141 2012/07/07 20:37:40 tom Exp $")
|
||||
|
||||
#ifdef USE_TERM_DRIVER
|
||||
#define MaxColors InfoOf(sp).maxcolors
|
||||
@ -619,6 +619,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
|
||||
#endif
|
||||
#if USE_SIZECHANGE
|
||||
sp->_resize = NCURSES_SP_NAME(resizeterm);
|
||||
sp->_ungetch = safe_ungetch;
|
||||
#endif
|
||||
|
||||
NewScreen(sp)->_clear = TRUE;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: resizeterm.c,v 1.44 2011/09/03 18:29:11 tom Exp $")
|
||||
MODULE_ID("$Id: resizeterm.c,v 1.45 2012/07/07 17:07:23 tom Exp $")
|
||||
|
||||
/*
|
||||
* If we're trying to be reentrant, do not want any local statics.
|
||||
@ -484,7 +484,6 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
|
||||
result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
|
||||
|
||||
#if USE_SIGWINCH
|
||||
safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
|
||||
clearok(CurScreen(SP_PARM), TRUE); /* screen contents are unknown */
|
||||
|
||||
/* ripped-off lines are a special case: if we did not lengthen
|
||||
@ -514,6 +513,9 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if USE_SIGWINCH
|
||||
safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
|
||||
#endif
|
||||
}
|
||||
|
||||
returnCode(result);
|
||||
|
@ -34,7 +34,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id: curses.priv.h,v 1.499 2012/03/10 21:16:32 tom Exp $
|
||||
* $Id: curses.priv.h,v 1.501 2012/07/07 20:47:07 tom Exp $
|
||||
*
|
||||
* curses.priv.h
|
||||
*
|
||||
@ -1159,6 +1159,7 @@ struct screen {
|
||||
*/
|
||||
#if USE_SIZECHANGE
|
||||
int (*_resize)(NCURSES_SP_DCLx int y, int x);
|
||||
int (*_ungetch)(SCREEN *, int);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_setup.c,v 1.143 2012/02/29 11:50:19 Werner.Fink Exp $")
|
||||
MODULE_ID("$Id: lib_setup.c,v 1.145 2012/07/07 20:35:27 tom Exp $")
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -399,8 +399,11 @@ _nc_update_screensize(SCREEN *sp)
|
||||
*/
|
||||
if (sp != 0
|
||||
&& sp->_resize != 0) {
|
||||
if ((new_lines != old_lines) || (new_cols != old_cols))
|
||||
if ((new_lines != old_lines) || (new_cols != old_cols)) {
|
||||
sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
|
||||
} else if (sp->_sig_winch && (sp->_ungetch != 0)) {
|
||||
sp->_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
|
||||
}
|
||||
sp->_sig_winch = FALSE;
|
||||
}
|
||||
}
|
||||
@ -666,7 +669,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
|
||||
const TERMTYPE *fallback = _nc_fallback(tname);
|
||||
|
||||
if (fallback) {
|
||||
_nc_copy_termtype(&(termp->type),fallback);
|
||||
_nc_copy_termtype(&(termp->type), fallback);
|
||||
status = TGETENT_YES;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (5.9-20120630) unstable; urgency=low
|
||||
ncurses6 (5.9-20120707) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 22 Jun 2012 13:52:38 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 07 Jul 2012 16:41:06 -0400
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Release: 5.9
|
||||
Version: 20120630
|
||||
Version: 20120707
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{release}-%{version}.tgz
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey
|
||||
*
|
||||
* $Id: demo_termcap.c,v 1.21 2012/06/30 22:02:56 tom Exp $
|
||||
* $Id: demo_termcap.c,v 1.22 2012/07/07 23:37:27 tom Exp $
|
||||
*
|
||||
* A simple demo of the termcap interface.
|
||||
*/
|
||||
@ -89,7 +89,7 @@ static char *
|
||||
make_dbitem(char *p, char *q)
|
||||
{
|
||||
char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
|
||||
sprintf(result, "%s=%.*s", e_opt, p - q, q);
|
||||
sprintf(result, "%s=%.*s", e_opt, (int) (p - q), q);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey
|
||||
*
|
||||
* $Id: demo_terminfo.c,v 1.12 2012/06/30 22:03:22 tom Exp $
|
||||
* $Id: demo_terminfo.c,v 1.13 2012/07/07 23:37:13 tom Exp $
|
||||
*
|
||||
* A simple demo of the terminfo interface.
|
||||
*/
|
||||
@ -70,7 +70,7 @@ static char *
|
||||
make_dbitem(char *p, char *q)
|
||||
{
|
||||
char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
|
||||
sprintf(result, "%s=%.*s", e_opt, p - q, q);
|
||||
sprintf(result, "%s=%.*s", e_opt, (int) (p - q), q);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -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.371 2012/06/09 20:30:32 tom Exp $
|
||||
$Id: ncurses.c,v 1.372 2012/07/07 18:09:38 tom Exp $
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -783,6 +783,15 @@ resize_boxes(unsigned level, WINDOW *win)
|
||||
#define remember_boxes(level,text,frame) /* nothing */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return-code is OK/ERR or a keyname.
|
||||
*/
|
||||
static const char *
|
||||
ok_keyname(int code)
|
||||
{
|
||||
return ((code == OK) ? "OK" : ((code == ERR) ? "ERR" : keyname(code)));
|
||||
}
|
||||
|
||||
static void
|
||||
wgetch_test(unsigned level, WINDOW *win, int delay)
|
||||
{
|
||||
@ -824,9 +833,11 @@ wgetch_test(unsigned level, WINDOW *win, int delay)
|
||||
} else if (c == 'g') {
|
||||
waddstr(win, "getstr test: ");
|
||||
echo();
|
||||
wgetnstr(win, buf, sizeof(buf) - 1);
|
||||
c = wgetnstr(win, buf, sizeof(buf) - 1);
|
||||
noecho();
|
||||
wprintw(win, "I saw %d characters:\n\t`%s'.", (int) strlen(buf), buf);
|
||||
wprintw(win, "I saw %d characters:\n\t`%s' (%s).",
|
||||
(int) strlen(buf), buf,
|
||||
ok_keyname(c));
|
||||
wclrtoeol(win);
|
||||
wgetch_wrap(win, first_y);
|
||||
} else if (c == 'k') {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2007-2009,2012 Free Software Foundation, Inc. *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
* copy of this software and associated documentation files (the *
|
||||
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: test_getstr.c,v 1.9 2009/08/29 19:02:25 tom Exp $
|
||||
* $Id: test_getstr.c,v 1.10 2012/07/07 18:22:49 tom Exp $
|
||||
*
|
||||
* Author: Thomas E Dickey
|
||||
*
|
||||
@ -58,6 +58,15 @@ typedef enum {
|
||||
eMaxFlavor
|
||||
} Flavors;
|
||||
|
||||
/*
|
||||
* Return-code is OK/ERR or a keyname.
|
||||
*/
|
||||
static const char *
|
||||
ok_keyname(int code)
|
||||
{
|
||||
return ((code == OK) ? "OK" : ((code == ERR) ? "ERR" : keyname(code)));
|
||||
}
|
||||
|
||||
static bool
|
||||
Quit(int ch)
|
||||
{
|
||||
@ -310,7 +319,7 @@ test_getstr(int level, char **argv, WINDOW *strwin)
|
||||
}
|
||||
noecho();
|
||||
(void) wattrset(txtwin, A_NORMAL);
|
||||
wprintw(strwin, "%d:%s", rc, buffer);
|
||||
wprintw(strwin, "%s:%s", ok_keyname(rc), buffer);
|
||||
wnoutrefresh(strwin);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user