summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cc0205e)
+ 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).
15 files changed:
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- 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
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
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).
20120630
+ add --enable-interop to sample package scripts (suggested by Juergen
Pfeifer).
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# 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
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 9
# 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)
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-# $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"), #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
#
# Author: Thomas E. Dickey 1996-on
#
#
# Author: Thomas E. Dickey 1996-on
#
+
+# 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
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h
$(srcdir)/nc_tparm.h
+# Porting
+@ port_win32con
+ncurses_mingw.h
+
'\" t
.\"***************************************************************************
'\" 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 *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" authorization. *
.\"***************************************************************************
.\"
.\" 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
.TH curs_getch 3X ""
.na
.hy 0
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.
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.
if there is no more room in the FIFO.
if there is no more room in the FIFO.
if the window pointer is null, or
if its timeout expires without having any data.
.RE
if the window pointer is null, or
if its timeout expires without having any data.
.RE
.\"***************************************************************************
.\"***************************************************************************
-.\" 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 *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\"
.\" Author: Thomas E. Dickey 1996-2005
.\"
.\"
.\" 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,
.TH resizeterm 3X ""
.SH NAME
\fBis_term_resized\fR,
the operating system.
Thus, even if a SIGWINCH is received,
no screen size change may be recorded.
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).
.SH SEE ALSO
\fBcurs_variables\fR(3X),
\fBwresize\fR(3X).
/****************************************************************************
/****************************************************************************
- * 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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#define CUR SP_TERMTYPE
#endif
#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
#ifdef USE_TERM_DRIVER
#define MaxColors InfoOf(sp).maxcolors
#endif
#if USE_SIZECHANGE
sp->_resize = NCURSES_SP_NAME(resizeterm);
#endif
#if USE_SIZECHANGE
sp->_resize = NCURSES_SP_NAME(resizeterm);
+ sp->_ungetch = safe_ungetch;
#endif
NewScreen(sp)->_clear = TRUE;
#endif
NewScreen(sp)->_clear = TRUE;
#define CUR SP_TERMTYPE
#endif
#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.
/*
* If we're trying to be reentrant, do not want any local statics.
result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
#if USE_SIGWINCH
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
clearok(CurScreen(SP_PARM), TRUE); /* screen contents are unknown */
/* ripped-off lines are a special case: if we did not lengthen
+#if USE_SIGWINCH
+ safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
+#endif
****************************************************************************/
/*
****************************************************************************/
/*
- * $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 $
*/
#if USE_SIZECHANGE
int (*_resize)(NCURSES_SP_DCLx int y, int x);
*/
#if USE_SIZECHANGE
int (*_resize)(NCURSES_SP_DCLx int y, int x);
+ int (*_ungetch)(SCREEN *, int);
#include <locale.h>
#endif
#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 $")
/****************************************************************************
*
/****************************************************************************
*
*/
if (sp != 0
&& sp->_resize != 0) {
*/
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);
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;
}
}
sp->_sig_winch = FALSE;
}
}
const TERMTYPE *fallback = _nc_fallback(tname);
if (fallback) {
const TERMTYPE *fallback = _nc_fallback(tname);
if (fallback) {
- _nc_copy_termtype(&(termp->type),fallback);
+ _nc_copy_termtype(&(termp->type), fallback);
status = TGETENT_YES;
}
}
status = TGETENT_YES;
}
}
-ncurses6 (5.9-20120630) unstable; urgency=low
+ncurses6 (5.9-20120707) unstable; urgency=low
- -- 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
ncurses6 (5.9-20120608) unstable; urgency=low
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
/*
* Author: Thomas E. Dickey
*
/*
* 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.
*/
*
* A simple demo of the termcap interface.
*/
make_dbitem(char *p, char *q)
{
char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
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);
/*
* Author: Thomas E. Dickey
*
/*
* 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.
*/
*
* A simple demo of the terminfo interface.
*/
make_dbitem(char *p, char *q)
{
char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
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);
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
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 $
***************************************************************************/
***************************************************************************/
#define remember_boxes(level,text,frame) /* nothing */
#endif
#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)
{
static void
wgetch_test(unsigned level, WINDOW *win, int delay)
{
} else if (c == 'g') {
waddstr(win, "getstr test: ");
echo();
} else if (c == 'g') {
waddstr(win, "getstr test: ");
echo();
- wgetnstr(win, buf, sizeof(buf) - 1);
+ c = wgetnstr(win, buf, sizeof(buf) - 1);
- 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') {
wclrtoeol(win);
wgetch_wrap(win, first_y);
} else if (c == 'k') {
/****************************************************************************
/****************************************************************************
- * 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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* authorization. *
****************************************************************************/
/*
* 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
*
*
* Author: Thomas E Dickey
*
+/*
+ * 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)
{
static bool
Quit(int ch)
{
}
noecho();
(void) wattrset(txtwin, A_NORMAL);
}
noecho();
(void) wattrset(txtwin, A_NORMAL);
- wprintw(strwin, "%d:%s", rc, buffer);
+ wprintw(strwin, "%s:%s", ok_keyname(rc), buffer);
wnoutrefresh(strwin);
break;
default:
wnoutrefresh(strwin);
break;
default: