------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.16 $
--- $Date: 2008/07/26 18:48:46 $
+-- $Revision: 1.17 $
+-- $Date: 2008/09/27 14:42:40 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Text_IO;
Set_Soft_Label_Key_Attributes (Color => Header_Color);
-- This propagates the attributes to the label window
- Clear_Soft_Label_Keys; Restore_Soft_Label_Keys;
+ Refresh_Soft_Label_Keys;
end if;
Init_Keyboard_Handler;
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: INSTALL,v 1.129 2008/08/23 20:02:46 tom Exp $
+-- $Id: INSTALL,v 1.130 2008/09/27 22:04:56 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
Normally this is the same as the release version; some ports have
special requirements for compatibility.
+ This option does not affect linking with libtool, which uses the
+ release major/minor numbers.
+
--with-ada-compiler=CMD
Specify the Ada95 compiler command (default "gnatmake")
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1297 2008/09/25 23:30:56 tom Exp $
+-- $Id: NEWS,v 1.1302 2008/09/27 22:37:50 tom Exp $
-------------------------------------------------------------------------------
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.
+20080927
+ + fix build for --with-dmalloc by workaround for redefinition of
+ strndup between string.h and dmalloc.h
+ + fix build for --disable-sigwinch
+ + add environment variable NCURSES_GPM_TERMS to allow override to use
+ GPM on terminals other than "linux", etc.
+ + disable GPM mouse support when $TERM does not happen to contain
+ "linux", since Gpm_Open() no longer limits its assertion to terminals
+ that it might handle, e.g., within "screen" in xterm.
+ + reset mouse file-descriptor when unloading GPM library (report by
+ Miroslav Lichvar).
+ + fix build for --disable-leaks --enable-widec --with-termlib
+ > patch by Juergen Pfeifer:
+ + use improved initialization for soft-label keys in Ada95 sample code.
+ + discard internal symbol _nc_slk_format (unused since 20080112).
+ + move call of slk_paint_info() from _nc_slk_initialize() to
+ slk_intern_refresh(), improving initialization.
+
20080925
+ fix bug in mouse code for GPM from 20080920 changes (reported in
Debian #500103, also Miroslav Lichvar).
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.662 2008/09/25 20:12:43 tom Exp $
+# $Id: dist.mk,v 1.663 2008/09/27 12:10:38 tom Exp $
# 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 = 6
-NCURSES_PATCH = 20080925
+NCURSES_PATCH = 20080927
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 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 *
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 *
+ * Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: nc_alloc.h,v 1.15 2007/02/03 18:40:23 tom Exp $ */
+/* $Id: nc_alloc.h,v 1.16 2008/09/27 22:30:33 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
#endif
#if HAVE_LIBDMALLOC
+#include <string.h>
+#undef strndup /* workaround for #define in GLIBC 2.7 */
#include <dmalloc.h> /* Gray Watson's library */
#else
#undef HAVE_LIBDMALLOC
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2008 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: ncurses.3x,v 1.89 2007/09/01 18:57:29 tom Exp $
+.\" $Id: ncurses.3x,v 1.90 2008/09/27 19:30:39 tom Exp $
.hy 0
.TH ncurses 3X ""
.ds n 5
To make it green-on-black, set it to "2,0".
Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed.
.TP 5
+NCURSES_GPM_TERMS
+This applies only to ncurses configured to use the GPM interface.
+.IP
+If present,
+the environment variable is a list of one or more terminal names
+against which the TERM environment variable is matched.
+Setting it to an empty value disables the GPM interface;
+using the built-in support for xterm, etc.
+.IP
+If the environment variable is absent,
+ncurses will attempt to open GPM if TERM contains "linux".
+.TP 5
NCURSES_NO_HARD_TABS
\fBNcurses\fP may use tabs as part of the cursor movement optimization.
In some cases,
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.53 2008/09/20 18:28:51 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.54 2008/09/27 13:09:57 tom Exp $")
/*
* Free all ncurses data. This is used for testing only (there's no practical
#ifdef TRACE
(void) _nc_trace_buf(-1, 0);
#endif
-
+#if USE_WIDEC_SUPPORT
+ FreeIfNeeded(_nc_wacs);
+#endif
_nc_leaks_tinfo();
#if HAVE_LIBDBMALLOC
#include <curses.priv.h>
-MODULE_ID("$Id: lib_mouse.c,v 1.99 2008/09/25 21:47:51 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.101 2008/09/27 19:14:52 tom Exp $")
#include <term.h>
#include <tic.h>
}
#if USE_GPM_SUPPORT
-static int
+static bool
allow_gpm_mouse(void)
{
+ bool result = FALSE;
+
/* GPM does printf's without checking if stdout is a terminal */
if (isatty(fileno(stdout))) {
+ char *list = getenv("NCURSES_GPM_TERMS");
char *env = getenv("TERM");
- /* GPM checks the beginning of the $TERM variable to decide if
- * it should pass xterm events through. There is no real advantage
- * in allowing GPM to do this.
- */
- if (env == 0 || strncmp(env, "xterm", 5))
- return TRUE;
+ if (list != 0) {
+ if (env != 0) {
+ result = _nc_name_match(list, env, "|:");
+ }
+ } else {
+ /* GPM checks the beginning of the $TERM variable to decide if it
+ * should pass xterm events through. There is no real advantage in
+ * allowing GPM to do this. Recent versions relax that check, and
+ * pretend that GPM can work with any terminal having the kmous
+ * capability. Perhaps that works for someone. If so, they can
+ * set the environment variable (above).
+ */
+ if (env != 0 && strstr(env, "linux") != 0) {
+ result = TRUE;
+ }
+ }
}
- return FALSE;
+ return result;
}
#ifdef HAVE_LIBDL
if (SP->_dlopen_gpm != 0) {
T(("unload GPM library"));
sp->_mouse_gpm_loaded = FALSE;
+ sp->_mouse_fd = -1;
dlclose(sp->_dlopen_gpm);
sp->_dlopen_gpm = 0;
}
#include <ctype.h>
#include <term.h> /* num_labels, label_*, plab_norm */
-MODULE_ID("$Id: lib_slk.c,v 1.34 2008/08/16 19:20:04 tom Exp $")
-
-/*
- * We'd like to move these into the screen context structure, but cannot,
- * because slk_init() is called before initscr()/newterm().
- */
-NCURSES_EXPORT_VAR(int)
-_nc_slk_format = 0; /* one more than format specified in slk_init() */
-
-/*
- * Paint the info line for the PC style SLK emulation.
- */
-static void
-slk_paint_info(WINDOW *win)
-{
- SCREEN *sp = _nc_screen_of(win);
-
- if (win && sp && (sp->slk_format == 4)) {
- int i;
-
- mvwhline(win, 0, 0, 0, getmaxx(win));
- wmove(win, 0, 0);
-
- for (i = 0; i < sp->_slk->maxlab; i++) {
- mvwprintw(win, 0, sp->_slk->ent[i].ent_x, "F%d", i + 1);
- }
- }
-}
+MODULE_ID("$Id: lib_slk.c,v 1.35 2008/09/27 14:07:33 juergen Exp $")
/*
* Free any memory related to soft labels, return an error.
x += max_length;
x += (i == 3 || i == 7) ? gap : 1;
}
- slk_paint_info(stwin);
} else {
if (_nc_globals.slk_format == 2) { /* 4-4 */
int gap = cols - (SP->_slk->maxlab * max_length) - 6;
return (ERR);
SP->_slk->hidden = FALSE;
SP->_slk->dirty = TRUE;
- /* we have to repaint info line eventually */
- slk_paint_info(SP->_slk->win);
returnCode(slk_refresh());
}
#include <curses.priv.h>
#include <term.h> /* num_labels, label_*, plab_norm */
-MODULE_ID("$Id: lib_slkrefr.c,v 1.16 2008/08/03 22:40:27 tom Exp $")
+MODULE_ID("$Id: lib_slkrefr.c,v 1.17 2008/09/27 14:07:53 juergen Exp $")
+
+/*
+ * Paint the info line for the PC style SLK emulation.
+ */
+static void
+slk_paint_info(WINDOW *win)
+{
+ SCREEN *sp = _nc_screen_of(win);
+
+ if (win && sp && (sp->slk_format == 4)) {
+ int i;
+
+ mvwhline(win, 0, 0, 0, getmaxx(win));
+ wmove(win, 0, 0);
+
+ for (i = 0; i < sp->_slk->maxlab; i++) {
+ mvwprintw(win, 0, sp->_slk->ent[i].ent_x, "F%d", i + 1);
+ }
+ }
+}
/*
* Write the soft labels to the soft-key window.
putp(TPARM_2(plab_norm, i + 1, slk->ent[i].form_text));
}
} else {
+ if (fmt == 4)
+ slk_paint_info(slk->win);
wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
if (SP->_slk) {
wattrset(slk->win, AttrOf(SP->_slk->attr));
/*
- * $Id: curses.priv.h,v 1.392 2008/09/20 21:14:11 tom Exp $
+ * $Id: curses.priv.h,v 1.393 2008/09/27 22:12:07 tom Exp $
*
* curses.priv.h
*
#define HAVE_SIZECHANGE 0
#endif
-#if HAVE_SIZECHANGE && defined(SIGWINCH)
+#if HAVE_SIZECHANGE && USE_SIGWINCH && defined(SIGWINCH)
#define USE_SIZECHANGE 1
#else
#define USE_SIZECHANGE 0
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: entries.c,v 1.7 2008/06/28 23:08:51 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.8 2008/09/27 13:11:10 tom Exp $")
/****************************************************************************
*
_nc_codes_leaks();
FreeIfNeeded(_nc_prescreen.real_acs_map);
#endif
-#if USE_WIDEC_SUPPORT
- FreeIfNeeded(_nc_wacs);
-#endif
if ((s = _nc_home_terminfo()) != 0)
free(s);
/****************************************************************************
- * Copyright (c) 1998-2001,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2008 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 *
* authorization. *
****************************************************************************/
-/* $Id: panel.priv.h,v 1.21 2005/11/26 15:27:00 tom Exp $ */
+/* $Id: panel.priv.h,v 1.22 2008/09/27 22:36:11 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
#include <string.h>
#include <assert.h>
-#if HAVE_LIBDMALLOC
-# include <dmalloc.h> /* Gray Watson's library */
-#endif
-
-#if HAVE_LIBDBMALLOC
-# include <dbmalloc.h> /* Conor Cahill's library */
-#endif
-
#include "curses.priv.h"
#include "panel.h"
#include <nc_panel.h>
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.328 2008/09/13 18:56:02 tom Exp $
+$Id: ncurses.c,v 1.329 2008/09/27 14:34:58 tom Exp $
***************************************************************************/
#if HAVE_SLK_COLOR
,"F/B -- cycle through foreground/background colors"
#endif
- ,"ESC -- return to main menu"
+ ,"ESC -- return to main menu"
,""
,"Note: if activating the soft keys causes your terminal to scroll up"
,"one line, your terminal auto-scrolls when anything is written to the"