From: Thomas E. Dickey Date: Sun, 26 Jun 2011 00:21:18 +0000 (+0000) Subject: ncurses 5.9 - patch 20110625 X-Git-Tag: v6.0~200 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=bd75bb126bdbd8300fe73e8e8b2fe97bd07eef75 ncurses 5.9 - patch 20110625 + improve cleanup() function in lib_tstp.c, using _exit() rather than exit() and checking for SIGTERM rather than SIGQUIT (prompted by comments forwarded by Nicholas Marriott). + reduce name pollution from term.h, moving fallback #define's for tcgetattr(), etc., to new private header nc_termios.h (report by Sergio NNX). + two minor fixes for tracing (patch by Vassili Courzakis). + improve trace initialization by starting it in use_env() and ripoffline(). + review old email, add details for some changelog entries. --- diff --git a/MANIFEST b/MANIFEST index 1e940929..5a95a1c8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -545,6 +545,7 @@ ./include/nc_alloc.h ./include/nc_mingw.h ./include/nc_panel.h +./include/nc_termios.h ./include/nc_tparm.h ./include/ncurses_cfg.hin ./include/ncurses_defs diff --git a/NEWS b/NEWS index f0671e38..c1a3665c 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1711 2011/06/11 18:40:59 tom Exp $ +-- $Id: NEWS,v 1.1726 2011/06/25 21:20:22 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. +20110625 + + improve cleanup() function in lib_tstp.c, using _exit() rather than + exit() and checking for SIGTERM rather than SIGQUIT (prompted by + comments forwarded by Nicholas Marriott). + + reduce name pollution from term.h, moving fallback #define's for + tcgetattr(), etc., to new private header nc_termios.h (report by + Sergio NNX). + + two minor fixes for tracing (patch by Vassili Courzakis). + + improve trace initialization by starting it in use_env() and + ripoffline(). + + review old email, add details for some changelog entries. + 20110611 + update minix entry to minix 3.2 (Thomas Cort). + fix a strict compiler warning in change to wattr_get (cf: 20110528). @@ -9062,15 +9074,18 @@ it is not possible to add this information. + correction to #317. > patch 317 (ESR): + re-add _nc_hash_map - + modify EmitRange to maintain position as per original design. - + add hashtest.c, program to time the hashmap optimization. + + modify EmitRange to maintain position as per original design + (patch by A. Lukyanov). + + modify test/ncurses.c and tputs, etc., to allow trace counting + output characters. + + add hashtest.c program to time the hashmap optimization. > patch 316 (ESR): + add logic to deal with magic-cookie (how was this tested?) (lib_doupdate.c). + add ncurses.c driver for magic-cookie, some fixes to ncurses.c > patch 315 (ESR): - + merged Alexander V Lukyanov's patch to use ech and rep - untested - (lib_doupdate.c). + + merge changes to lib_doupdate.c to use ech and rep - untested + (patch by Alexander V Lukyanov). + modified handling of interrupted system calls - untested (lib_getch.c, lib_twait.c). + new function _nc_mvcur_resume() @@ -9142,7 +9157,7 @@ it is not possible to add this information. + corrected typo in dtterm description. > patch 313 (ESR): + add dtterm description - + clarify ncurses 'i' test (drop vscanf subtest) + + clarify ncurses 'i' test (drop mvwscanw subtest) 960810 - snapshot + correct nl()/nonl() to work as per SVr4 & XSI. @@ -9156,7 +9171,8 @@ it is not possible to add this information. > patch 312 (ESR): correct terminfo.src corrupted by #310 > patch 311 (ESR): - + fix idlok() and idcok() and the default of the idlok switch. + + fix idlok() and idcok() and the default of the idlok switch (report + by Ville Sulko). 960803 - snapshot + corrected tparm to handle capability strings without explicit pop @@ -9166,7 +9182,7 @@ it is not possible to add this information. > patch 310 (ESR): + documentation and prototyping errors for has_color, immedok and idcok (reported by William P Setzer ) - + updated qnx terminfo entry (by Michael Hunter) + + updated qnx terminfo entry (patch by Michael Hunter) 960730 + eliminate quoted includes in ncurses subdirectory, ensure config.h @@ -9178,7 +9194,7 @@ it is not possible to add this information. + call cbreak() in initscr(), as per XSI & SVr4. + turn off hardware echo in initscr() as per XSI & SVr4 > patch 309 (ESR): - + terminfo changes (9.3.10), from BRL + + terminfo changes (9.3.9), from BRL + add more checks to terminfo parser. + add more symbols to infocmp. @@ -9197,6 +9213,7 @@ it is not possible to add this information. > patch 308 (ESR): + terminfo changes (9.3.8) + modified logic of error-reporting in terminfo parser + + fix option-processing bug in toe. 960713 - snapshot + always check for since ISC needs it to declare @@ -9205,9 +9222,19 @@ it is not possible to add this information. by Juergen Pfeifer, Mike Long) + add LOCAL_LDFLAGS2 symbol (Juergen Pfeifer) + corrected prototype for delay_output() -- bump ABI to 3.2 - + terminfo patches #306/307 (ESR). + + patch 307 (ESR): + + enable more translations of nonstandard caps, and document them. + + misc/terminfo.src update to 9.13.8 + + patch 306 (ESR): + moved logic that filters out rmul and rmso from setupterm to newterm where it is less likely to interfere with termcap applications. + + cosmetic fixes to test/ncurses.c + + modify open() call in ncurses/read_entry.c to use O_RDONLY symbol + rather than constant (report by mib). + + misc/terminfo.src sgr0 and acsc changes (report by Philippe De + Muyter). + + modify ncurses/comp_parse.c so that entries containing a "+" can + have missing rmcup vs smcup. 960707 + rollback ESR's #305 change to terminfo.src (it breaks existing @@ -9222,7 +9249,6 @@ it is not possible to add this information. + make lib_vidattr.c more readable using macros. + filter out rmul, rmso that conflict with sgr0 when reading terminal descriptions. - + added sanity-checking of various paired string attributes (ESR). + work around autoconf bug, force $INSTALL to absolute path (reported by Zeyd). + modify man-page install for BSDI to install preformatted .0 files @@ -9235,6 +9261,12 @@ it is not possible to add this information. + disable scrollok during the ncurses 'p' test; if it is enabled the stdscr will scroll when putting the box-corners in the lower-right of the screen. + > patch 305 (ESR): + + added sanity-checking of various paired string attributes. + + misc/terminfo.src update to 9.13.7 (report by A. Lukyanov). + + modify man/Makefile.in to make terminfo.5 during normal build. + > patch 304 (ESR): + + corrected allocation-length for $HOME/.terminfo path. 960629 - snapshot + check return code of _nc_mvcur_scrolln() in _nc_scroll_optimize() for @@ -9317,6 +9349,7 @@ it is not possible to add this information. + better fix for nvi refresh-bug (Rick Marshall) + fix for bug in handling of interrupted keystroke waits, (Werner Fleck). + + misc/ncurses-intro.html syntax fix (Kajiyama Tamito). 960601 - snapshot + auto-configure man-page compression-format and renames for Debian. @@ -9346,6 +9379,9 @@ it is not possible to add this information. + include sys/types.h in case stdlib.h does not declare size_t. + fixes for makefile (Tim Mooney) + fixes for menus & forms (Juergen Pfeifer) + > patch 302 (ESR): + + improve hash function (suggested by Alexander V Lukyanov). + + 9.13.4 update for terminfo.src 960518 - snapshot + revised ncurses.c panner test, let pad abut all 4 sides of screen. @@ -9358,6 +9394,8 @@ it is not possible to add this information. confusion, and made this check for the /usr/lib/terminfo pre-existing directory. > patches 299-301 (ESR): + + html fixes (Phillippe de Muyter). + + fix typo in ncurses-intro.html (report by Fabrizio Polacco). + added hashmap.c + mods to tracing, especially for ACS chars. + corrected off-by-one in IDCtransform. @@ -9377,13 +9415,21 @@ it is not possible to add this information. > patches 297, 298 (ESR): + implement TERMINFO_DIRS, and -o option of tic + added TRACE_IEVENT - + removed boolean version of 'getm' - + added lib_print.c (for Rick Marshall) - + added has_key() + + fix REQ_TOGGLE_ITEM in menu/menu_driver.c; it could select but not + deselect. + + added lib_print.c (request by Rick Marshall). + + added has_key() (request by Juergen Pfeifer). + + do not issue clrtoeol or clrtobot if the relevant portion of the line + is already blank (analysis by Keith Bostic). + + add parentheses for parameters of COLOR_PAIR and PAIR_NUMBER macros + (analysis by Jurgen Eidt). + + update screen's notion of cursor position in endwin() (analysis by + Alexander Lukyanov). + added 't' to ncurses.c test. + moved delay_output() to lib_tputs.c + removed tparam() (was added in 1.9.9, but conflicts with emacs and is not part of X/Open Curses). + + removed boolean version of 'getm'. + misc cursor & optimization fixes. 960504 - snapshot @@ -9409,11 +9455,20 @@ it is not possible to add this information. + make TIOCGWINSZ configure test less stringent, in case user configures via terminal that cannot get screen size. > patches 295, 296 (ESR): - + new "-e" option of tic. - + fix for "infocmp -e". - + restore working-directory in read_termcap.c + split lib_kernel.c, lib_setup.c and names.c in order to reduce overhead for programs that use only termcap features. + + new "-e" and "-h" options of tic (request by Tony Nugent). + + fix bug in mandatory-delay logic in lib_tputs.c (report by Sven + Verdoolaege). + + fix for "infocmp -e" to emit correct initializers (reported by Manual + J Novoa III). + + restore working-directory in read_termcap.c (report by Kayvan + Sylvan). + + use "-h" option on Solaris when generating shared libraries on + Solaris 2.5 to record the library name in the file, for assisting + the loader (patch by Scott Kramer). + + undo patch #294 changes to form and menu libraries (request by + Juergen Pfeifer). 960418 - snapshot + use autoconf 2.9 @@ -9421,10 +9476,22 @@ it is not possible to add this information. definitions via , modified macros in lib_raw.c to avoid K&R-style substitution) > patches 293, 294 (ESR): - + mods to wgetch() in cooked mode - + corrected askuser() logic in tset - + correct interaction of endwin() with mouse processing + + rewrite wsyncup(), wsyncdown(), as well as small fixes to form and + menu libraries to fix echo-breakage introduced by 1.8.9, 1.9.9e + changes (patches by Juergen Pfeifer). + + fix compile under QNX 4.2 by defining ONLCR in lib_raw.c when + __QNX__ is defined (patch by Michael Hunter). + + modify setupterm() to match documentation for its return value, fix + newterm to work with this change (report by Emmet Lazich). + + add checks in getch() for error, return ERR as appropriate (report by + Emmet Lazich). + + mods to wgetch() in cooked mode (report by Pete Seebach). + + corrected askuser() logic in tset (patch by Remco Treffkorn). + + correct interaction of endwin() with mouse processing (report by + Michael Elkins). + added trace support for TTY flags + + update terminfo.src to 9.13.1 + + FreeBSD console entries (patch by Andrew Chernov). 960406 + fixes for NeXT, ISC and HPUX auto-configure diff --git a/dist.mk b/dist.mk index 35083f6a..3397ff2d 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.820 2011/06/06 08:44:40 tom Exp $ +# $Id: dist.mk,v 1.822 2011/06/25 19:02:07 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 = 20110611 +NCURSES_PATCH = 20110625 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index 261c40d7..51ffbc3d 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -1,7 +1,7 @@ # vile:awkmode BEGIN { print "/****************************************************************************" - print " * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *" + print " * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *" print " * *" print " * Permission is hereby granted, free of charge, to any person obtaining a *" print " * copy of this software and associated documentation files (the *" @@ -34,7 +34,7 @@ BEGIN { print "/* and: Thomas E. Dickey 1995-on */" print "/****************************************************************************/" print "" - print "/* $Id: MKterm.h.awk.in,v 1.58 2010/01/09 19:53:26 tom Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.60 2011/06/25 20:51:00 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -93,41 +93,6 @@ BEGIN { print "#include " print "#define TTY struct termio" print "" - print "/* Add definitions to make termio look like termios." - print " * But ifdef it, since there are some implementations" - print " * that try to do this for us in a fake ." - print " */" - print "#ifndef TCSANOW" - print "#define TCSANOW TCSETA" - print "#endif" - print "#ifndef TCSADRAIN" - print "#define TCSADRAIN TCSETAW" - print "#endif" - print "#ifndef TCSAFLUSH" - print "#define TCSAFLUSH TCSETAF" - print "#endif" - print "#ifndef tcsetattr" - print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)" - print "#endif" - print "#ifndef tcgetattr" - print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)" - print "#endif" - print "#ifndef cfgetospeed" - print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)" - print "#endif" - print "#ifndef TCIFLUSH " - print "#define TCIFLUSH 0" - print "#endif" - print "#ifndef TCOFLUSH " - print "#define TCOFLUSH 1" - print "#endif" - print "#ifndef TCIOFLUSH " - print "#define TCIOFLUSH 2" - print "#endif" - print "#ifndef tcflush" - print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)" - print "#endif" - print "" print "#else /* !HAVE_TERMIO_H */" print "" print "#if __MINGW32__" diff --git a/include/nc_termios.h b/include/nc_termios.h new file mode 100644 index 00000000..5a636069 --- /dev/null +++ b/include/nc_termios.h @@ -0,0 +1,171 @@ +/**************************************************************************** + * Copyright (c) 2011 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"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey 2011 * + ****************************************************************************/ + +/* $Id: nc_termios.h,v 1.2 2011/06/25 20:44:05 tom Exp $ */ + +#ifndef NC_TERMIOS_included +#define NC_TERMIOS_included 1 + +#if HAVE_TERMIOS_H && HAVE_TCGETATTR + +#else /* !HAVE_TERMIOS_H */ + +#if HAVE_TERMIO_H + +/* Add definitions to make termio look like termios. + * But ifdef it, since there are some implementations + * that try to do this for us in a fake . + */ +#ifndef TCSADRAIN +#define TCSADRAIN TCSETAW +#endif +#ifndef TCSAFLUSH +#define TCSAFLUSH TCSETAF +#endif +#ifndef tcsetattr +#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg) +#endif +#ifndef tcgetattr +#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg) +#endif +#ifndef cfgetospeed +#define cfgetospeed(t) ((t)->c_cflag & CBAUD) +#endif +#ifndef TCIFLUSH +#define TCIFLUSH 0 +#endif +#ifndef tcflush +#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg) +#endif + +#else /* !HAVE_TERMIO_H */ + +#if __MINGW32__ + +/* c_cc chars */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VTIME 5 +#define VMIN 6 + +/* c_iflag bits */ +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define BRKINT 0000002 +#define PARMRK 0000010 +#define IXON 0002000 +#define IGNBRK 0000001 +#define IGNPAR 0000004 +#define INPCK 0000020 +#define IXOFF 0010000 + +/* c_oflag bits */ +#define OPOST 0000001 + +/* c_cflag bit meaning */ +#define CBAUD 0010017 +#define CSIZE 0000060 +#define CS8 0000060 +#define B0 0000000 +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define CLOCAL 0004000 +#define CREAD 0000200 +#define CSTOPB 0000100 +#define HUPCL 0002000 +#define PARENB 0000400 +#define PARODD 0001000 + +/* c_lflag bits */ +#define ECHO 0000010 +#define ECHONL 0000100 +#define ISIG 0000001 +#define IEXTEN 0100000 +#define ICANON 0000002 +#define NOFLSH 0000200 +#define ECHOE 0000020 +#define ECHOK 0000040 + +/* tcflush() */ +#define TCIFLUSH 0 + +/* tcsetattr uses these */ +#define TCSADRAIN 1 + +/* ioctls */ +#define TCGETA 0x5405 +#define TCFLSH 0x540B +#define TIOCGWINSZ 0x5413 + +#ifndef cfgetospeed +#define cfgetospeed(t) ((t)->c_cflag & CBAUD) +#endif + +#ifndef tcsetattr +#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg) +#endif + +#ifndef tcgetattr +#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg) +#endif + +#ifndef tcflush +#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg) +#endif + +#undef ttyname +#define ttyname(fd) NULL + +#else + +#endif /* __MINGW32__ */ +#endif /* HAVE_TERMIO_H */ + +#endif /* HAVE_TERMIOS_H */ + +#endif /* NC_TERMIOS_included */ diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h index 4ea1dad5..7feb4c51 100644 --- a/include/ncurses_mingw.h +++ b/include/ncurses_mingw.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2011 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 * @@ -31,10 +31,10 @@ * * ****************************************************************************/ -/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */ +/* $Id: ncurses_mingw.h,v 1.2 2011/06/25 20:51:00 tom Exp $ */ /* - * This is a placholder up to now and describes what needs to be implemented + * This is a placeholder up to now and describes what needs to be implemented * to support I/O to external terminals with ncurses on the Windows OS. */ @@ -67,98 +67,8 @@ struct termios speed_t c_ospeed; /* c_ospeed */ }; -/* c_cc chars */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 - -/* c_iflag bits */ -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define BRKINT 0000002 -#define PARMRK 0000010 -#define IXON 0002000 -#define IGNBRK 0000001 -#define IGNPAR 0000004 -#define INPCK 0000020 -#define IXOFF 0010000 - -/* c_oflag bits */ -#define OPOST 0000001 - -/* c_cflag bit meaning */ -#define CBAUD 0010017 -#define CSIZE 0000060 -#define CS8 0000060 -#define B0 0000000 -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define CLOCAL 0004000 -#define CREAD 0000200 -#define CSTOPB 0000100 -#define HUPCL 0002000 -#define PARENB 0000400 -#define PARODD 0001000 - -/* c_lflag bits */ -#define ECHO 0000010 -#define ECHONL 0000100 -#define ISIG 0000001 -#define IEXTEN 0100000 -#define ICANON 0000002 -#define NOFLSH 0000200 -#define ECHOE 0000020 -#define ECHOK 0000040 - -/* tcflush() */ -#define TCIFLUSH 0 - -/* tcsetattr uses these */ -#define TCSADRAIN 1 - -/* ioctls */ -#define TCGETA 0x5405 -#define TCFLSH 0x540B -#define TIOCGWINSZ 0x5413 - extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg); extern void _nc_set_term_driver(void* term); -#ifndef cfgetospeed -#define cfgetospeed(t) ((t)->c_cflag & CBAUD) -#endif - -#ifndef tcsetattr -#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg) -#endif - -#ifndef tcgetattr -#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg) -#endif - -#ifndef tcflush -#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg) -#endif - -#undef ttyname -#define ttyname(fd) NULL - -#endif -#endif +#endif /* _NC_MINGWH */ +#endif /* __MINGW32__ */ diff --git a/include/term_entry.h b/include/term_entry.h index 4770f865..cd496fa3 100644 --- a/include/term_entry.h +++ b/include/term_entry.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2011 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 * @@ -32,7 +32,7 @@ * and: Thomas E. Dickey 1998-on * ****************************************************************************/ -/* $Id: term_entry.h,v 1.37 2009/07/11 16:52:29 tom Exp $ */ +/* $Id: term_entry.h,v 1.38 2011/06/25 20:51:00 tom Exp $ */ /* * term_entry.h -- interface to entry-manipulation code @@ -46,6 +46,7 @@ extern "C" { #endif #include +#include #define MAX_USES 32 #define MAX_CROSSLINKS 16 diff --git a/misc/terminfo.src b/misc/terminfo.src index 6178239b..27c96d30 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -21132,7 +21132,7 @@ v3220|LANPAR Vision II model 3220/3221/3222, # * Replaced HP entries up to hpsub with purpose-built ones. # * Blank rmir/smir/rmdc/smdc capabilities removed. # * Small fixes merged in from SCO entries for lpr, fos, tvi910+, tvi924. -# 9.4.8 (Fri Apr 7 09:36:34 EDT 199): +# 9.4.8 (Fri Apr 7 09:36:34 EDT 1995): # * Replaced the Ann Arbor entries with SCO's, the init strings are # more efficient (but the entries otherwise identical). # * Added dg211 from Shuford archive. diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c index 8c02086a..a77bc487 100644 --- a/ncurses/base/lib_refresh.c +++ b/ncurses/base/lib_refresh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 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 * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_refresh.c,v 1.44 2010/12/19 01:22:58 tom Exp $") +MODULE_ID("$Id: lib_refresh.c,v 1.45 2011/06/25 19:02:22 Vassili.Courzakis Exp $") NCURSES_EXPORT(int) wrefresh(WINDOW *win) @@ -90,12 +90,6 @@ wnoutrefresh(WINDOW *win) #endif T((T_CALLED("wnoutrefresh(%p)"), (void *) win)); -#ifdef TRACE - if (USE_TRACEF(TRACE_UPDATE)) { - _tracedump("...win", win); - _nc_unlock_global(tracef); - } -#endif /* TRACE */ /* * This function will break badly if we try to refresh a pad. @@ -104,6 +98,13 @@ wnoutrefresh(WINDOW *win) || (win->_flags & _ISPAD)) returnCode(ERR); +#ifdef TRACE + if (USE_TRACEF(TRACE_UPDATE)) { + _tracedump("...win", win); + _nc_unlock_global(tracef); + } +#endif /* TRACE */ + /* put them here so "win == 0" won't break our code */ begx = win->_begx; begy = win->_begy; diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index df0a276a..c67cf8c1 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 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.138 2010/12/20 00:42:20 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.139 2011/06/14 22:50:58 tom Exp $") #ifdef USE_TERM_DRIVER #define MaxColors InfoOf(sp).maxcolors @@ -759,6 +759,7 @@ NCURSES_SP_NAME(ripoffline) (NCURSES_SP_DCLx int line, int (*init) (WINDOW *, int)) { + START_TRACE(); return NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx (line < 0) ? -1 : 1, init); diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 2f49d238..a9d2e128 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.479 2011/06/04 23:14:09 tom Exp $ + * $Id: curses.priv.h,v 1.480 2011/06/25 20:36:52 tom Exp $ * * curses.priv.h * @@ -342,6 +342,7 @@ color_t; #endif #include +#include /* * Reduce dependency on cur_term global by using terminfo data from SCREEN's diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 40af877b..b23ea971 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -47,7 +47,7 @@ #include #endif -MODULE_ID("$Id: lib_setup.c,v 1.137 2011/05/21 17:35:14 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.138 2011/06/14 22:36:29 tom Exp $") /**************************************************************************** * @@ -221,6 +221,7 @@ NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f) { T((T_CALLED("use_env(%p,%d)"), (void *) SP_PARM, (int) f)); #if NCURSES_SP_FUNCS + START_TRACE(); if (IsPreScreen(SP_PARM)) { SP_PARM->_use_env = f; } @@ -235,6 +236,7 @@ NCURSES_EXPORT(void) use_env(bool f) { T((T_CALLED("use_env(%d)"), (int) f)); + START_TRACE(); _nc_prescreen.use_env = f; returnVoid; } diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index 6ccdfc74..583ee0fd 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_tstp.c,v 1.42 2011/04/16 16:42:10 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.44 2011/06/25 21:22:16 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -240,16 +240,19 @@ cleanup(int sig) SCREEN *sp = CURRENT_SCREEN; /* - * Actually, doing any sort of I/O from within an signal handler is - * "unsafe". But we'll _try_ to clean up the screen and terminal - * settings on the way out. + * Much of this is unsafe from a signal handler. But we'll _try_ to clean + * up the screen and terminal settings on the way out. + * + * There are at least the following problems: + * 1) Walking the SCREEN list is unsafe, since all list management + * is done without any signal blocking. + * 2) On systems which have REENTRANT turned on, set_term() uses + * _nc_lock_global() which could deadlock or misbehave in other ways. + * 3) endwin() calls all sorts of stuff, many of which use stdio or + * other library functions which are clearly unsafe. */ if (!_nc_globals.cleanup_nested++ - && (sig == SIGINT -#ifdef SIGQUIT - || sig == SIGQUIT -#endif - )) { + && (sig == SIGINT || sig == SIGTERM)) { #if HAVE_SIGACTION || HAVE_SIGVEC sigaction_t act; sigemptyset(&act.sa_mask); @@ -270,11 +273,11 @@ cleanup(int sig) set_term(scan); NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG); if (sp) - sp->_endwin = FALSE; /* in case we have an atexit! */ + sp->_endwin = FALSE; /* in case of reuse */ } } } - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } #if USE_SIGWINCH diff --git a/ncurses/widechar/lib_box_set.c b/ncurses/widechar/lib_box_set.c index 585c9496..f9e701fa 100644 --- a/ncurses/widechar/lib_box_set.c +++ b/ncurses/widechar/lib_box_set.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2003,2009 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2011 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 * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_box_set.c,v 1.5 2009/10/24 22:36:56 tom Exp $") +MODULE_ID("$Id: lib_box_set.c,v 1.6 2011/06/25 19:02:07 Vassili.Courzakis Exp $") NCURSES_EXPORT(int) wborder_set(WINDOW *win, @@ -52,7 +52,7 @@ wborder_set(WINDOW *win, NCURSES_SIZE_T endx, endy; NCURSES_CH_T wls, wrs, wts, wbs, wtl, wtr, wbl, wbr; - T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"), + T((T_CALLED("wborder_set(%p,%s,%s,%s,%s,%s,%s,%s,%s)"), (void *) win, _tracech_t2(1, ls), _tracech_t2(2, rs),