+ move del_curterm() call from _nc_freeall() to _nc_leaks_tinfo() to
work for progs/clear, progs/tabs, etc.
+ correct buffer-size after internal resizing of wide-character
set_field_buffer(), broken in
20081018 changes (report by Mike Gran).
+ add "-i" option to test/filter.c to tell it to use initscr() rather
than newterm(), to investigate report on comp.unix.programmer that
ncurses would clear the screen in that case (it does not - the issue
was xterm's alternate screen feature).
+ add check in mouse-driver to disable connection if GPM returns a
zero, indicating that the connection is closed (Debian #506717,
adapted from patch by Samuel Thibault).
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1330 2008/11/29 21:08:00 tom Exp $
+-- $Id: NEWS,v 1.1334 2008/12/07 00:12:46 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.
+20081206
+ + move del_curterm() call from _nc_freeall() to _nc_leaks_tinfo() to
+ work for progs/clear, progs/tabs, etc.
+ + correct buffer-size after internal resizing of wide-character
+ set_field_buffer(), broken in 20081018 changes (report by Mike Gran).
+ + add "-i" option to test/filter.c to tell it to use initscr() rather
+ than newterm(), to investigate report on comp.unix.programmer that
+ ncurses would clear the screen in that case (it does not - the issue
+ was xterm's alternate screen feature).
+ + add check in mouse-driver to disable connection if GPM returns a
+ zero, indicating that the connection is closed (Debian #506717,
+ adapted from patch by Samuel Thibault).
+
20081129
+ improve a workaround in adding wide-characters, when a control
character is found. The library (cf: 20040207) uses unctrl() to
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.674 2008/11/28 16:15:46 tom Exp $
+# $Id: dist.mk,v 1.675 2008/12/06 21:19:42 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 = 7
-NCURSES_PATCH = 20081129
+NCURSES_PATCH = 20081206
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#include "form.priv.h"
-MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.89 2008/12/06 23:08:12 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
delwin(field->working);
field->working = newpad(field->drows, field->dcols);
}
+ len = Buffer_Length(field);
wclear(field->working);
mvwaddstr(field->working, 0, 0, value);
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.54 2008/09/27 13:09:57 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.55 2008/12/06 23:52:29 tom Exp $")
/*
* Free all ncurses data. This is used for testing only (there's no practical
delscreen(SP);
_nc_unlock_global(curses);
}
- if (cur_term != 0)
- del_curterm(cur_term);
(void) _nc_printf_string(0, empty_va);
#ifdef TRACE
#include <curses.priv.h>
-MODULE_ID("$Id: lib_mouse.c,v 1.103 2008/11/23 00:11:46 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.104 2008/11/30 01:37:27 tom Exp $")
#include <term.h>
#include <tic.h>
#if USE_GPM_SUPPORT
case M_GPM:
- {
+ if (sp->_mouse_fd >= 0) {
/* query server for event, return TRUE if we find one */
Gpm_Event ev;
- if (my_Gpm_GetEvent(&ev) == 1) {
+ switch (my_Gpm_GetEvent(&ev)) {
+ case 0:
+ /* Connection closed, drop the mouse. */
+ sp->_mouse_fd = -1;
+ break;
+ case 1:
/* there's only one mouse... */
eventp->id = NORMAL_EVENT;
/* bump the next-free pointer into the circular list */
sp->_mouse_eventp = eventp = NEXT(eventp);
result = TRUE;
+ break;
}
}
break;
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: entries.c,v 1.8 2008/09/27 13:11:10 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.10 2008/12/07 00:11:45 tom Exp $")
/****************************************************************************
*
T((T_CALLED("_nc_free_tinfo()")));
#if NO_LEAKS
+ if (cur_term != 0)
+ del_curterm(cur_term);
+
_nc_free_tparm();
_nc_tgetent_leaks();
_nc_free_entries(_nc_head);
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,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> 1998
*
- * $Id: filter.c,v 1.11 2006/12/09 16:53:47 tom Exp $
+ * $Id: filter.c,v 1.12 2008/12/06 21:59:27 tom Exp $
*/
#include <test.priv.h>
return code;
}
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: filter [options]"
+ ,""
+ ,"Options:"
+ ," -i use initscr() rather than newterm()"
+ };
+ unsigned n;
+ for (n = 0; n < SIZEOF(msg); n++)
+ fprintf(stderr, "%s\n", msg[n]);
+ ExitProgram(EXIT_FAILURE);
+}
+
int
-main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+main(int argc, char *argv[])
{
+ int ch;
char buffer[80];
attr_t underline;
+ bool i_option = FALSE;
setlocale(LC_ALL, "");
+ while ((ch = getopt(argc, argv, "i")) != -1) {
+ switch (ch) {
+ case 'i':
+ i_option = TRUE;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ printf("starting filter program using %s...\n",
+ i_option ? "initscr" : "newterm");
filter();
- (void) newterm((char *) 0, stdout, stdin);
+ if (i_option) {
+ initscr();
+ } else {
+ (void) newterm((char *) 0, stdout, stdin);
+ }
cbreak();
keypad(stdscr, TRUE);