mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2025-01-30 15:19:27 +08:00
ncurses 5.7 - patch 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).
This commit is contained in:
parent
86b23c4fe3
commit
879fd5bd9d
15
NEWS
15
NEWS
@ -25,7 +25,7 @@
|
||||
-- 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
|
||||
@ -45,6 +45,19 @@ 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.
|
||||
|
||||
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
|
||||
|
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.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
|
||||
@ -37,7 +37,7 @@ SHELL = /bin/sh
|
||||
# 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)
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#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
|
||||
@ -4366,6 +4366,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
|
||||
delwin(field->working);
|
||||
field->working = newpad(field->drows, field->dcols);
|
||||
}
|
||||
len = Buffer_Length(field);
|
||||
wclear(field->working);
|
||||
mvwaddstr(field->working, 0, 0, value);
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
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
|
||||
@ -98,8 +98,6 @@ _nc_freeall(void)
|
||||
delscreen(SP);
|
||||
_nc_unlock_global(curses);
|
||||
}
|
||||
if (cur_term != 0)
|
||||
del_curterm(cur_term);
|
||||
|
||||
(void) _nc_printf_string(0, empty_va);
|
||||
#ifdef TRACE
|
||||
|
@ -79,7 +79,7 @@
|
||||
|
||||
#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>
|
||||
@ -694,11 +694,16 @@ _nc_mouse_event(SCREEN *sp GCC_UNUSED)
|
||||
|
||||
#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;
|
||||
|
||||
@ -731,6 +736,7 @@ _nc_mouse_event(SCREEN *sp GCC_UNUSED)
|
||||
/* bump the next-free pointer into the circular list */
|
||||
sp->_mouse_eventp = eventp = NEXT(eventp);
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#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 $")
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -117,6 +117,9 @@ _nc_leaks_tinfo(void)
|
||||
|
||||
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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* 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 *
|
||||
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* 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>
|
||||
|
||||
@ -78,16 +78,50 @@ new_command(char *buffer, int length, attr_t underline)
|
||||
return code;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
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, 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user