]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20120922
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 22 Sep 2012 23:21:49 +0000 (23:21 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 22 Sep 2012 23:21:49 +0000 (23:21 +0000)
+ modify setupterm to set its copy of TERM to "unknown" if configured
  for the terminal driver and TERM was null or empty.
+ modify treatment of TERM variable for MinGW port to allow explicit
  use of the windows console driver by checking if $TERM is set to
  "#win32con" or an abbreviation of that.
+ undo recent change to fallback definition of vsscanf() to build with
  older Solaris compilers (cf: 20120728).
  to help with MinGW port.
+ modifications for MinGW port to make wide-character display usable.

NEWS
README.MinGW
dist.mk
include/curses.h.in
ncurses/base/lib_driver.c
ncurses/tinfo/lib_setup.c
ncurses/win32con/win_driver.c
package/debian/changelog
package/ncurses.spec

diff --git a/NEWS b/NEWS
index f7fa197d14e76c9aba8b44e8fc74a43635555c7b..44818dfa7dd074f5d1e529ace751237289ecb312 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1953 2012/09/08 22:05:39 tom Exp $
+-- $Id: NEWS,v 1.1957 2012/09/22 20:11:31 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,14 +45,23 @@ 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.
 
+20120922
+       + modify setupterm to set its copy of TERM to "unknown" if configured
+         for the terminal driver and TERM was null or empty.
+       + modify treatment of TERM variable for MinGW port to allow explicit
+         use of the windows console driver by checking if $TERM is set to
+         "#win32con" or an abbreviation of that.
+       + undo recent change to fallback definition of vsscanf() to build with
+         older Solaris compilers (cf: 20120728).
+
 20120908
        + add test-screens to test/ncurses to show 256-characters at a time,
-         to help with mingw port.
+         to help with MinGW port.
 
 20120903
        + simplify varargs logic in lib_printw.c; va_copy is no longer needed
          there.
-       + modifications for mingw port to make wide-character display usable.
+       + modifications for MinGW port to make wide-character display usable.
 
 20120902
        + regenerate configure script (report by Sven Joachim, cf: 20120901).
index f879f3b3c817fa80a4c1f5b6ff1a39c1de2d2e46..f7d789777a1d5156d79363b94b094f1aa48b81c0 100644 (file)
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README.MinGW,v 1.8 2012/01/21 23:55:33 tom Exp $
+-- $Id: README.MinGW,v 1.9 2012/09/22 17:46:04 tom Exp $
 -- Author: Juergen Pfeifer
 -------------------------------------------------------------------------------
 
@@ -55,8 +55,9 @@ to provide the includes, libraries and DLLs to be used with the more
 common traditional development environments on Windows, mainly with
 Microsoft Visual Studio.
 
-It is necessary to unset the TERM environment variable, to activate the
-Windows console-driver.
+The TERM environment variable must be set specially to active the Windows
+console-driver.  The driver checks if TERM is set to "#win32con" (explicit
+use) or if TERM is unset or empty (implicit).
 
 Please also make sure that MSYS links to the correct directory containing
 your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
@@ -83,7 +84,9 @@ hooks for interop, I recommend using these options:
          --enable-term-driver
          --enable-interop
 
-This is the configuration commandline as I'm using it at the moment (assuming environment variable MINGW_ROOT to hold the root directory name of your MinGW build):
+This is the configuration commandline as I'm using it at the moment (assuming
+environment variable MINGW_ROOT to hold the root directory name of your MinGW
+build):
 
 ./configure \
        --prefix=$MINGW_ROOT \
@@ -120,7 +123,7 @@ experimental.
 
 A lot is still TODO, e.g.:
 
-  - Wide Character support
+  - Wide Character support (display is workable, but input untested)
     The Win32Con driver should actually only use Unicode in the
     future.
   - Thread support (locking). If using TDM toolchain this is done by
@@ -131,5 +134,5 @@ A lot is still TODO, e.g.:
   - Workarounds for MinGW's filesystem access are necessary to make infocmp
     work (though tic works).
 
-To support terminfo, we need to have an ioctl() simulation for the
-serial and networked Terminals.
+To support terminfo, we would need to have an ioctl() simulation for the
+serial and networked terminals.
diff --git a/dist.mk b/dist.mk
index fe3431199b858738f0e0fddf1f00d6b760b43af9..30c3298bde1cd0cbd81ee9292423a95be2341556 100644 (file)
--- 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.892 2012/09/08 15:40:37 tom Exp $
+# $Id: dist.mk,v 1.893 2012/09/22 17:49:36 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 = 20120908
+NCURSES_PATCH = 20120922
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 526526a808becececdd0994266cff16bbd5b7c42..361711ca7adb3e2b58fe006bf0e388fa59d9d1e2 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.232 2012/07/28 18:17:43 tom Exp $ */
+/* $Id: curses.h.in,v 1.233 2012/09/16 21:05:02 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -1311,7 +1311,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);     /*
  * Export fallback function for use in C++ binding.
  */
 #if !@HAVE_VSSCANF@
-#define vsscanf(a,b,c) _nc_vsscanf((a),(b),(c))
+#define vsscanf(a,b,c) _nc_vsscanf(a,b,c)
 NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
 #endif
 
index 40487609be4d4c2e70ceb8ebaa4f0971f21bb8d7..6301a5887d64281eb822c03f12b5b1f1cbbc89e1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 2008-2010,2012 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            *
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_driver.c,v 1.3 2010/12/20 00:29:17 tom Exp $")
+MODULE_ID("$Id: lib_driver.c,v 1.4 2012/09/22 19:32:46 tom Exp $")
 
 typedef struct DriverEntry {
     const char *name;
@@ -43,9 +43,9 @@ typedef struct DriverEntry {
 static DRIVER_ENTRY DriverTable[] =
 {
 #ifdef __MINGW32__
-    {"win", &_nc_WIN_DRIVER},
+    {"win32con", &_nc_WIN_DRIVER},
 #endif
-    {"tinfo", &_nc_TINFO_DRIVER}
+    {"tinfo", &_nc_TINFO_DRIVER}       /* must be last */
 };
 
 NCURSES_EXPORT(int)
@@ -63,6 +63,20 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
 
     for (i = 0; i < SIZEOF(DriverTable); i++) {
        res = DriverTable[i].driver;
+       /*
+        * Use "#" (a character which cannot begin a terminal's name) to
+        * select specific driver from the table.
+        *
+        * In principle, we could have more than one non-terminfo driver,
+        * e.g., "win32gui".
+        */
+       if (name != 0 && *name == '#') {
+           size_t n = strlen(name + 1);
+           if (n != 0
+               && strncmp(name + 1, DriverTable[i].name, n)) {
+               continue;
+           }
+       }
        if (res->CanHandle(TCB, name, errret)) {
            use = res;
            break;
index 51030b6b4f03069c280ccb85bd4aa63301979012..60ce2c68f9024f58f596db130d447cbea6c9472e 100644 (file)
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.149 2012/09/03 16:19:14 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.150 2012/09/22 18:46:12 tom Exp $")
 
 /****************************************************************************
  *
@@ -636,7 +636,11 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
     if (tname == 0) {
        tname = getenv("TERM");
        if (tname == 0 || *tname == '\0') {
+#ifdef USE_TERM_DRIVER
+           tname = "unknown";
+#else
            ret_error0(TGETENT_ERR, "TERM environment variable not set.\n");
+#endif
        }
     }
 
index afc1a16815b7ccb83a4bbb8f4ba3bd0650271ba4..02cd378c9e2e4079d7ac2b29200bbfa0a3b7ea5c 100644 (file)
@@ -38,7 +38,7 @@
 #include <curses.priv.h>
 #define CUR my_term.type.
 
-MODULE_ID("$Id: win_driver.c,v 1.13 2012/09/03 16:20:24 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.14 2012/09/22 19:15:14 tom Exp $")
 
 #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
 
@@ -340,7 +340,7 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
     assert(tname != 0);
 
     TCB->magic = WINMAGIC;
-    if (*tname == 0 || *tname == 0) {
+    if (*tname == 0 || *tname == 0 || *tname == '#') {
        code = TRUE;
     } else {
        TERMINAL my_term;
index 5e8e56f9e1e16d5689c65d223e31f161feeeba00..f2fdb19da6bf56b3366d19601e6b6da6922f9514 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20120908) unstable; urgency=low
+ncurses6 (5.9-20120922) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Sep 2012 14:28:23 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 22 Sep 2012 13:50:11 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index fa467ea224eb0cb916b70b9762f516fdf352c24e..49a38d196c5da951672e498c915d7f77f75d3b31 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Release: 5.9
-Version: 20120908
+Version: 20120922
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz