]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20110625
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 26 Jun 2011 00:21:18 +0000 (00:21 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 26 Jun 2011 00:21:18 +0000 (00:21 +0000)
+ 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.

14 files changed:
MANIFEST
NEWS
dist.mk
include/MKterm.h.awk.in
include/nc_termios.h [new file with mode: 0644]
include/ncurses_mingw.h
include/term_entry.h
misc/terminfo.src
ncurses/base/lib_refresh.c
ncurses/base/lib_set_term.c
ncurses/curses.priv.h
ncurses/tinfo/lib_setup.c
ncurses/tty/lib_tstp.c
ncurses/widechar/lib_box_set.c

index 1e94092906f18ab58d82522b357b521652468ee9..5a95a1c81024a609695d16c70db88f2b4146ab9d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./include/nc_alloc.h
 ./include/nc_mingw.h
 ./include/nc_panel.h
 ./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
 ./include/nc_tparm.h
 ./include/ncurses_cfg.hin
 ./include/ncurses_defs
diff --git a/NEWS b/NEWS
index f0671e38fdcf51df148816230b7e5ef0b577171f..c1a3665c3e2452b6a84fce20bb5dc1b676bb8769 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- 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.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
 -------------------------------------------------------------------------------
 
 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.
 
 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).
 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
        + 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):
        > 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()
        + 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
        + 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.
 
 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):
        > 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
 
 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 <wsetzer@pams.ncsu.edu>)
        > patch 310 (ESR):
        + documentation and prototyping errors for has_color, immedok and idcok
          (reported by William P Setzer <wsetzer@pams.ncsu.edu>)
-       + 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
 
 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):
        + 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.
 
        + 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
        > 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 <sys/bsdtypes.h> since ISC needs it to declare
 
 960713 - snapshot
        + always check for <sys/bsdtypes.h> 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
          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.
        + 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
 
 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.
        + 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
        + 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.
        + 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
 
 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).
        + 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.
 
 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)
        + 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.
 
 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):
          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.
        + 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
        > 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).
        + 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
        + 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):
        + 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.
        + 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
 
 960418 - snapshot
        + use autoconf 2.9
@@ -9421,10 +9476,22 @@ it is not possible to add this information.
          definitions via <termios.h>, modified macros in lib_raw.c to avoid
          K&R-style substitution)
        > patches 293, 294 (ESR):
          definitions via <termios.h>, 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
        + 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
 
 960406
        + fixes for NeXT, ISC and HPUX auto-configure
diff --git a/dist.mk b/dist.mk
index 35083f6ae18bc62ba9901c770e026a422f615684..3397ff2dd4a8f4d5bfe1a8c79ec4ebb5b80ed4c2 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # 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.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
 # 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
 # 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)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 261c40d75619ac2eba7fc4c70db9063d0dfea9c4..51ffbc3d9ed64fab071fb7f294c62e5e017df7e3 100644 (file)
@@ -1,7 +1,7 @@
 # vile:awkmode
 BEGIN          {
                    print  "/****************************************************************************"
 # 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            *"
                    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  "/*    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"
                    print  ""
                    print  "/*"
                    print  "**  term.h -- Definition of struct term"
@@ -93,41 +93,6 @@ BEGIN                {
                    print  "#include <termio.h>"
                    print  "#define TTY struct termio"
                    print  ""
                    print  "#include <termio.h>"
                    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 <termio.h>."
-                   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__"
                    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 (file)
index 0000000..5a63606
--- /dev/null
@@ -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 <termio.h>.
+ */
+#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 */
index 4ea1dad537371e1228939705f692e6724374bb00..7feb4c51c9123c409971ab8509f73312029a1f40 100644 (file)
@@ -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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  ****************************************************************************/
 
  *                                                                          *
  ****************************************************************************/
 
-/* $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.
  */
 
  * 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           */
 };
 
   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);
 
 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__ */
index 4770f8659c48c44ee65a58f4940daeffc2a4ba73..cd496fa31b875bd9ec98b05e6800f25710c0de8d 100644 (file)
@@ -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            *
  *                                                                          *
  * 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                 *
  ****************************************************************************/
 
  *     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
 
 /*
  *     term_entry.h -- interface to entry-manipulation code
@@ -46,6 +46,7 @@ extern "C" {
 #endif
 
 #include <term.h>
 #endif
 
 #include <term.h>
+#include <nc_termios.h>
 
 #define MAX_USES       32
 #define MAX_CROSSLINKS 16
 
 #define MAX_USES       32
 #define MAX_CROSSLINKS 16
index 6178239b3bd32437ed12198162dbb9eac7de828c..27c96d30da3ffea017f2f1b6745bdc3386c395d1 100644 (file)
@@ -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.
 #      * 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.
 #      * Replaced the Ann Arbor entries with SCO's, the init strings are
 #        more efficient (but the entries otherwise identical).
 #      * Added dg211 from Shuford archive.
index 8c02086a707d34302e3d96182974436ba7b1859c..a77bc487f21c4f8cd4d7dfc0677b473cda93fa60 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-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)
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
@@ -90,12 +90,6 @@ wnoutrefresh(WINDOW *win)
 #endif
 
     T((T_CALLED("wnoutrefresh(%p)"), (void *) 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.
 
     /*
      * This function will break badly if we try to refresh a pad.
@@ -104,6 +98,13 @@ wnoutrefresh(WINDOW *win)
        || (win->_flags & _ISPAD))
        returnCode(ERR);
 
        || (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;
     /* put them here so "win == 0" won't break our code */
     begx = win->_begx;
     begy = win->_begy;
index df0a276aef8a3a61f749226e5eb7216244b5b43d..c67cf8c1a9e374b7250235e9a8482a45ba9af8b0 100644 (file)
@@ -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            *
  *                                                                          *
  * 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
 
 #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
 
 #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))
 {
                             int line,
                             int (*init) (WINDOW *, int))
 {
+    START_TRACE();
     return NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
                                            (line < 0) ? -1 : 1,
                                            init);
     return NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
                                            (line < 0) ? -1 : 1,
                                            init);
index 2f49d23811c92d4845fcd960cb073691e8d1268e..a9d2e128b1e558b54669027532aaea2ce73303b0 100644 (file)
@@ -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
  *
  *
  *     curses.priv.h
  *
@@ -342,6 +342,7 @@ color_t;
 #endif
 
 #include <term.h>
 #endif
 
 #include <term.h>
+#include <nc_termios.h>
 
 /*
  * Reduce dependency on cur_term global by using terminfo data from SCREEN's
 
 /*
  * Reduce dependency on cur_term global by using terminfo data from SCREEN's
index 40af877b5dbe583c73017a785ecf0d8b183b9532..b23ea97120d4597674e4df5d768672a81026dfd5 100644 (file)
@@ -47,7 +47,7 @@
 #include <locale.h>
 #endif
 
 #include <locale.h>
 #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
 {
     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;
     }
     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));
 use_env(bool f)
 {
     T((T_CALLED("use_env(%d)"), (int) f));
+    START_TRACE();
     _nc_prescreen.use_env = f;
     returnVoid;
 }
     _nc_prescreen.use_env = f;
     returnVoid;
 }
index 6ccdfc74a27f631db6244d408dcb8de351fa68f1..583ee0fdd5053d2fd06aa9375694ca092199870a 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <SigAction.h>
 
 
 #include <SigAction.h>
 
-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
 
 #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
 #define USE_SIGTSTP 1
@@ -240,16 +240,19 @@ cleanup(int sig)
     SCREEN *sp = CURRENT_SCREEN;
 
     /*
     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++
      */
     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);
 #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)
                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
 }
 
 #if USE_SIGWINCH
index 585c94963b0f3ab8e3dfca2c5f8bcc75e129de1a..f9e701fa14cf8213549d84aecf6785e489135645 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-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,
 
 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;
 
     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),
        (void *) win,
        _tracech_t2(1, ls),
        _tracech_t2(2, rs),