]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20140308
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 9 Mar 2014 00:21:30 +0000 (00:21 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 9 Mar 2014 00:21:30 +0000 (00:21 +0000)
+ modify ifdef in read_entry.c to handle the case where
  NCURSES_USE_DATABASE is not defined (patch by Xin Li).
+ add cast in form_driver_w() to fix ARM build (patch by Xin Li).
+ add logic to win_driver.c to save/restore screen contents when not
  allocating a console-buffer (cf: 20140215).

37 files changed:
NEWS
dist.mk
form/frm_driver.c
man/ncurses.3x
ncurses/base/define_key.c
ncurses/base/keyok.c
ncurses/base/lib_beep.c
ncurses/base/lib_color.c
ncurses/base/lib_dft_fgbg.c
ncurses/base/lib_driver.c
ncurses/base/lib_endwin.c
ncurses/base/lib_flash.c
ncurses/base/lib_getch.c
ncurses/base/lib_mouse.c
ncurses/base/lib_newterm.c
ncurses/base/lib_set_term.c
ncurses/base/lib_slkrefr.c
ncurses/base/resizeterm.c
ncurses/curses.priv.h
ncurses/tinfo/lib_acs.c
ncurses/tinfo/lib_cur_term.c
ncurses/tinfo/lib_napms.c
ncurses/tinfo/lib_options.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_ttyflags.c
ncurses/tinfo/read_entry.c
ncurses/tinfo/tinfo_driver.c
ncurses/tty/lib_mvcur.c
ncurses/tty/lib_twait.c
ncurses/tty/lib_vidattr.c
ncurses/win32con/win_driver.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec

diff --git a/NEWS b/NEWS
index ba4d91d23d560f345283053962101795d822c8bb..a356be370e2f86baee35ab20d5a8edfdb2606501 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.2174 2014/03/01 23:17:47 tom Exp $
+-- $Id: NEWS,v 1.2177 2014/03/08 22:10:41 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,13 @@ 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.
 
+20140308
+       + modify ifdef in read_entry.c to handle the case where
+         NCURSES_USE_DATABASE is not defined (patch by Xin Li).
+       + add cast in form_driver_w() to fix ARM build (patch by Xin Li).
+       + add logic to win_driver.c to save/restore screen contents when not
+         allocating a console-buffer (cf: 20140215).
+
 20140301
        + clarify error-returns from newwin (report by Ruslan Nabioullin).
 
diff --git a/dist.mk b/dist.mk
index 134dce39f6bf5698aa07fab476873086841cc06a..7f43575d1c1de2e8a7844611fef44965edb0ded1 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.974 2014/03/01 14:32:51 tom Exp $
+# $Id: dist.mk,v 1.975 2014/03/08 19:20:13 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 = 20140301
+NCURSES_PATCH = 20140308
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index ed561bf1e9e57e91257a91f6d0159599dc243021..3b7705710f65cf019784fe4ae673a43552c35a1c 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_driver.c,v 1.110 2014/02/10 00:42:48 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.111 2014/03/08 22:08:20 Xin.Li Exp $")
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
@@ -4493,7 +4493,7 @@ form_driver_w(FORM *form, int type, wchar_t c)
   const Binding_Info *BI = (Binding_Info *) 0;
   int res = E_UNKNOWN_COMMAND;
 
-  T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int) c));
+  T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int)c));
 
   if (!form)
     RETURN(E_BAD_ARGUMENT);
@@ -4503,7 +4503,7 @@ form_driver_w(FORM *form, int type, wchar_t c)
 
   assert(form->page);
 
-  if (c == FIRST_ACTIVE_MAGIC)
+  if (c == (wchar_t)FIRST_ACTIVE_MAGIC)
     {
       form->current = _nc_First_Active_Field(form);
       RETURN(E_OK);
index 6a5aa7c0c2feb6987310ee5bea3596c8ea2e8427..0c0c2ef39747762071c7600f03e82c282b6ed6e4 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.112 2013/07/20 19:29:59 tom Exp $
+.\" $Id: ncurses.3x,v 1.115 2014/03/08 22:07:02 tom Exp $
 .hy 0
 .TH ncurses 3X ""
 .ie \n(.g .ds `` \(lq
@@ -760,14 +760,6 @@ The following environment symbols are useful for customizing the
 runtime behavior of the \fBncurses\fR library.
 The most important ones have been already discussed in detail.
 .TP 5
-BAUDRATE
-The debugging library checks this environment variable when the application
-has redirected output to a file.
-The variable's numeric value is used for the baudrate.
-If no value is found, \fBncurses\fR uses 9600.
-This allows testers to construct repeatable test-cases
-that take into account costs that depend on baudrate.
-.TP 5
 CC
 When set, change occurrences of the command_character
 (i.e., the \fBcmdch\fP capability)
@@ -778,6 +770,14 @@ Because this name is also used in development environments to represent
 the C compiler's name, \fBncurses\fR ignores it if it does not happen to
 be a single character.
 .TP 5
+BAUDRATE
+The debugging library checks this environment variable when the application
+has redirected output to a file.
+The variable's numeric value is used for the baudrate.
+If no value is found, \fBncurses\fR uses 9600.
+This allows testers to construct repeatable test-cases
+that take into account costs that depend on baudrate.
+.TP 5
 COLUMNS
 Specify the width of the screen in characters.
 Applications running in a windowing environment usually are able to
@@ -868,6 +868,17 @@ about the colors, set this to "\-1,\-1".
 To make it green-on-black, set it to "2,0".
 Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed.
 .TP 5
+NCURSES_CONSOLE2
+This applies only to the MinGW port of ncurses.
+.IP
+The \fBConsole2\fP program's handling of the Microsoft Console API call
+\fBCreateConsoleScreenBuffer\fP is defective.
+Applications which use this will hang.
+However, it is possible to simulate the action of this call by
+mapping coordinates,
+explicitly saving and restoring the original screen contents.
+Setting the environment variable \fBNCGDB\fP has the same effect.
+.TP 5
 NCURSES_GPM_TERMS
 This applies only to ncurses configured to use the GPM interface.
 .IP
@@ -1131,6 +1142,16 @@ the wide-character library's headers should be installed last,
 to allow applications to be built using either library
 from the same set of headers.
 .TP 5
+\-\-with\-pthread
+The configure script renames the library.
+All of the library names have a "t" appended to them
+(before any "w" added by \fB\-\-enable\-widec\fP).
+.IP
+The global variables such as \fBLINES\fP are replaced by macros to
+allow read-only access.
+At the same time, setter-functions are provided to set these values.
+Some applications (very few) may require changes to work with this convention.
+.TP 5
 \-\-with\-shared
 .TP
 \-\-with\-normal
index a49b094279c8f3d4a444e2561bee4294bde57bb1..c78375a72c25416d36d7189411622040e06d0d7d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2014 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: define_key.c,v 1.20 2009/11/28 22:53:17 tom Exp $")
+MODULE_ID("$Id: define_key.c,v 1.21 2014/03/08 20:32:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(define_key) (NCURSES_SP_DCLx const char *str, int keycode)
@@ -47,7 +47,7 @@ NCURSES_SP_NAME(define_key) (NCURSES_SP_DCLx const char *str, int keycode)
        unsigned ukey = (unsigned) keycode;
 
 #ifdef USE_TERM_DRIVER
-#define CallHasKey(keycode) CallDriver_1(SP_PARM, kyExist, keycode)
+#define CallHasKey(keycode) CallDriver_1(SP_PARM, td_kyExist, keycode)
 #else
 #define CallHasKey(keycode) NCURSES_SP_NAME(has_key)(NCURSES_SP_ARGx keycode)
 #endif
index 00e936dacde991fd8233451558db5a2b94342b6c..37fddecfa526880c7d654a592f3b5d22f858473e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 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: keyok.c,v 1.13 2012/11/18 02:14:35 tom Exp $")
+MODULE_ID("$Id: keyok.c,v 1.14 2014/03/08 20:32:59 tom Exp $")
 
 /*
  * Enable (or disable) ncurses' interpretation of a keycode by adding (or
@@ -53,7 +53,7 @@ NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
     if (HasTerminal(SP_PARM)) {
        T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
 #ifdef USE_TERM_DRIVER
-       code = CallDriver_2(sp, kyOk, c, flag);
+       code = CallDriver_2(sp, td_kyOk, c, flag);
 #else
        T((T_CALLED("keyok(%d,%d)"), c, flag));
        if (c >= 0) {
index 4e14cb74a2bfc4c38b842d6772d1c43f7550f677..b775d56e8001136eadc2d255d7a578b5a849ec73 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -46,7 +46,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_beep.c,v 1.16 2013/01/12 17:26:25 tom Exp $")
+MODULE_ID("$Id: lib_beep.c,v 1.17 2014/03/08 20:32:59 tom Exp $")
 
 /*
  *     beep()
@@ -65,7 +65,7 @@ NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
 
 #ifdef USE_TERM_DRIVER
     if (SP_PARM != 0)
-       res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
+       res = CallDriver_1(SP_PARM, td_doBeepOrFlash, TRUE);
 #else
     /* FIXME: should make sure that we are not in altchar mode */
     if (cur_term == 0) {
index 9f7250ddaffff9b688948953b06837a97cfedd46..1322600c340054d288ad9f3e2bfb0c2ed7040267 100644 (file)
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_color.c,v 1.109 2014/02/01 22:22:30 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.110 2014/03/08 20:04:44 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define CanChange      InfoOf(SP_PARM).canchange
@@ -188,7 +188,7 @@ static void
 set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc)
 {
 #ifdef USE_TERM_DRIVER
-    CallDriver_3(SP_PARM, color, FALSE, bg, outc);
+    CallDriver_3(SP_PARM, td_color, FALSE, bg, outc);
 #else
     if (set_a_background) {
        TPUTS_TRACE("set_a_background");
@@ -208,7 +208,7 @@ static void
 set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc)
 {
 #ifdef USE_TERM_DRIVER
-    CallDriver_3(SP_PARM, color, TRUE, fg, outc);
+    CallDriver_3(SP_PARM, td_color, TRUE, fg, outc);
 #else
     if (set_a_foreground) {
        TPUTS_TRACE("set_a_foreground");
@@ -258,7 +258,7 @@ static bool
 reset_color_pair(NCURSES_SP_DCL0)
 {
 #ifdef USE_TERM_DRIVER
-    return CallDriver(SP_PARM, rescol);
+    return CallDriver(SP_PARM, td_rescol);
 #else
     bool result = FALSE;
 
@@ -288,7 +288,7 @@ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0)
        result = TRUE;
 
 #ifdef USE_TERM_DRIVER
-    result = CallDriver(SP_PARM, rescolors);
+    result = CallDriver(SP_PARM, td_rescolors);
 #else
     if (orig_colors != 0) {
        NCURSES_PUTP2("orig_colors", orig_colors);
@@ -547,7 +547,7 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx
        SET_SCREEN_PAIR(SP_PARM, (chtype) (~0));        /* force attribute update */
 
 #ifdef USE_TERM_DRIVER
-    CallDriver_3(SP_PARM, initpair, pair, f, b);
+    CallDriver_3(SP_PARM, td_initpair, pair, f, b);
 #else
     if (initialize_pair && InPalette(f) && InPalette(b)) {
        const color_t *tp = DefaultPalette;
@@ -625,7 +625,7 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
        }
 
 #ifdef USE_TERM_DRIVER
-       CallDriver_4(SP_PARM, initcolor, color, r, g, b);
+       CallDriver_4(SP_PARM, td_initcolor, color, r, g, b);
 #else
        NCURSES_PUTP2("initialize_color",
                      TPARM_4(initialize_color, color, r, g, b));
@@ -811,7 +811,7 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
                               NCURSES_SP_OUTC outc)
 {
 #ifdef USE_TERM_DRIVER
-    CallDriver_4(SP_PARM, docolor, old_pair, pair, reverse, outc);
+    CallDriver_4(SP_PARM, td_docolor, old_pair, pair, reverse, outc);
 #else
     NCURSES_COLOR_T fg = COLOR_DEFAULT;
     NCURSES_COLOR_T bg = COLOR_DEFAULT;
index 00cbafb397304d6a4d0c765e10b4b8c19fd36dc8..4d7fdd0f240dff0809c9f835033481beac97c13f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2011,2014 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            *
@@ -37,7 +37,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.26 2011/04/23 18:28:18 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.27 2014/03/08 20:32:59 tom Exp $")
 
 /*
  * Modify the behavior of color-pair 0 so that the library doesn't assume that
@@ -70,7 +70,7 @@ NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
     T((T_CALLED("assume_default_colors(%p,%d,%d)"), (void *) SP_PARM, fg, bg));
 #ifdef USE_TERM_DRIVER
     if (sp != 0)
-       code = CallDriver_2(sp, defaultcolors, fg, bg);
+       code = CallDriver_2(sp, td_defaultcolors, fg, bg);
 #else
     if ((orig_pair || orig_colors) && !initialize_pair) {
 
index 6301a5887d64281eb822c03f12b5b1f1cbbc89e1..4f4b8ce5e20e128c9cdc01d76fa0ce799f5fce18 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2008-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 2008-2012,2014 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.4 2012/09/22 19:32:46 tom Exp $")
+MODULE_ID("$Id: lib_driver.c,v 1.5 2014/03/08 20:32:59 tom Exp $")
 
 typedef struct DriverEntry {
     const char *name;
@@ -77,7 +77,7 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
                continue;
            }
        }
-       if (res->CanHandle(TCB, name, errret)) {
+       if (res->td_CanHandle(TCB, name, errret)) {
            use = res;
            break;
        }
@@ -93,7 +93,7 @@ NCURSES_EXPORT(int)
 NCURSES_SP_NAME(has_key) (SCREEN *sp, int keycode)
 {
     T((T_CALLED("has_key(%p, %d)"), (void *) sp, keycode));
-    returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, kyExist, keycode) : FALSE);
+    returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, td_kyExist, keycode) : FALSE);
 }
 
 NCURSES_EXPORT(int)
@@ -108,7 +108,7 @@ NCURSES_SP_NAME(_nc_mcprint) (SCREEN *sp, char *data, int len)
     int code = ERR;
 
     if (0 != TerminalOf(sp))
-       code = CallDriver_2(sp, print, data, len);
+       code = CallDriver_2(sp, td_print, data, len);
     return (code);
 }
 
@@ -126,7 +126,7 @@ NCURSES_SP_NAME(doupdate) (SCREEN *sp)
     T((T_CALLED("doupdate(%p)"), (void *) sp));
 
     if (IsValidScreen(sp))
-       code = CallDriver(sp, update);
+       code = CallDriver(sp, td_update);
 
     returnCode(code);
 }
@@ -144,7 +144,7 @@ NCURSES_SP_NAME(mvcur) (SCREEN *sp, int yold, int xold, int ynew, int xnew)
     TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%p,%d,%d,%d,%d)"),
                                  (void *) sp, yold, xold, ynew, xnew));
     if (HasTerminal(sp)) {
-       code = CallDriver_4(sp, hwcur, yold, xold, ynew, xnew);
+       code = CallDriver_4(sp, td_hwcur, yold, xold, ynew, xnew);
     }
     returnCode(code);
 }
index 4596d07496332ea45e7acc7bdaf314b91f402302..9ebf76933ff8d75c9c72cf8704164c87dd60aa3c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2014 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 <curses.priv.h>
 
-MODULE_ID("$Id: lib_endwin.c,v 1.22 2009/10/24 22:02:14 tom Exp $")
+MODULE_ID("$Id: lib_endwin.c,v 1.23 2014/03/08 20:32:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
@@ -56,8 +56,8 @@ NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
        TERMINAL_CONTROL_BLOCK *TCB = TCBOf(SP_PARM);
 
        SP_PARM->_endwin = TRUE;
-       if (TCB && TCB->drv && TCB->drv->scexit)
-           TCB->drv->scexit(SP_PARM);
+       if (TCB && TCB->drv && TCB->drv->td_scexit)
+           TCB->drv->td_scexit(SP_PARM);
 #else
        SP_PARM->_endwin = TRUE;
        SP_PARM->_mouse_wrap(SP_PARM);
index 3520177ea33fbf42b8befce92a3fb978b00b8243..7f25038cea516d75b4efae44b03b89e232414109 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -46,7 +46,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_flash.c,v 1.13 2013/01/12 17:26:07 tom Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.14 2014/03/08 20:32:59 tom Exp $")
 
 /*
  *     flash()
@@ -64,7 +64,7 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
     T((T_CALLED("flash(%p)"), (void *) SP_PARM));
 #ifdef USE_TERM_DRIVER
     if (SP_PARM != 0)
-       res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
+       res = CallDriver_1(SP_PARM, td_doBeepOrFlash, FALSE);
 #else
     if (HasTerminal(SP_PARM)) {
        /* FIXME: should make sure that we are not in altchar mode */
index 0a04ef5a6e1bf1728b98a2a14aa52b625f704879..aae578ab72de032c7d3cc5c026e998767fa2a6e6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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 <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.126 2013/02/16 18:30:37 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.127 2014/03/08 20:32:59 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -133,7 +133,7 @@ check_mouse_activity(SCREEN *sp, int delay EVENTLIST_2nd(_nc_eventlist * evl))
     int rc;
 
 #ifdef USE_TERM_DRIVER
-    rc = TCBOf(sp)->drv->testmouse(TCBOf(sp), delay EVENTLIST_2nd(evl));
+    rc = TCBOf(sp)->drv->td_testmouse(TCBOf(sp), delay EVENTLIST_2nd(evl));
 #else
 #if USE_SYSMOUSE
     if ((sp->_mouse_type == M_SYSMOUSE)
@@ -268,7 +268,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
     {                          /* Can block... */
 #ifdef USE_TERM_DRIVER
        int buf;
-       n = CallDriver_1(sp, read, &buf);
+       n = CallDriver_1(sp, td_read, &buf);
        ch = buf;
 #else
        unsigned char c2 = 0;
index b0e0f613ebc3175d09566018928dbb616d8ffb56..cb250a852a3d60e3a143c6fdc079002dac8fd08c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -84,7 +84,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.141 2013/09/21 19:09:19 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.142 2014/03/08 20:32:59 tom Exp $")
 
 #include <tic.h>
 
@@ -668,7 +668,7 @@ initialize_mousetype(SCREEN *sp)
 #endif /* USE_SYSMOUSE */
 
 #ifdef USE_TERM_DRIVER
-    CallDriver(sp, initmouse);
+    CallDriver(sp, td_initmouse);
 #else
     /* we know how to recognize mouse events under "xterm" */
     if (key_mouse != 0) {
index 435763d096ea40a0092b082912565dfb7ff7c538..cbb7f2b486a5158a10739ea916176a19543c20d0 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: lib_newterm.c,v 1.90 2013/09/28 21:02:56 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.91 2014/03/08 20:32:59 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels      InfoOf(SP_PARM).numlabels
@@ -306,7 +306,7 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
 
            /* compute movement costs so we can do better move optimization */
 #ifdef USE_TERM_DRIVER
-           TCBOf(SP_PARM)->drv->scinit(SP_PARM);
+           TCBOf(SP_PARM)->drv->td_scinit(SP_PARM);
 #else /* ! USE_TERM_DRIVER */
            /*
             * Check for mismatched graphic-rendition capabilities.  Most SVr4
index acf6bc1f71cd10745cb07c3b58b303671a20459e..c1cf134ba942cb21bbe023c4d88fe8a227c980dc 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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.148 2013/08/31 13:33:06 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.149 2014/03/08 20:32:59 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -351,7 +351,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
        slines = 1;
        SET_LINES(slines);
 #ifdef USE_TERM_DRIVER
-       CallDriver(sp, setfilter);
+       CallDriver(sp, td_setfilter);
 #else
        clear_screen = 0;
        cursor_down = parm_down_cursor = 0;
index 6d9fcd63507c75f59cf8be5bb8056df9f29d345c..382f9c4b00f7a2842aae38912e5dfa0d2c475a58 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -43,7 +43,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_slkrefr.c,v 1.29 2013/01/12 17:25:48 tom Exp $")
+MODULE_ID("$Id: lib_slkrefr.c,v 1.30 2014/03/08 20:32:59 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
@@ -97,7 +97,7 @@ slk_intern_refresh(SCREEN *sp)
            if (slk->ent[i].visible) {
                if (numlab > 0 && SLK_STDFMT(fmt)) {
 #ifdef USE_TERM_DRIVER
-                   CallDriver_2(sp, hwlabel, i + 1, slk->ent[i].form_text);
+                   CallDriver_2(sp, td_hwlabel, i + 1, slk->ent[i].form_text);
 #else
                    if (i < num_labels) {
                        NCURSES_PUTP2("plab_norm",
@@ -125,7 +125,7 @@ slk_intern_refresh(SCREEN *sp)
 
     if (numlab > 0) {
 #ifdef USE_TERM_DRIVER
-       CallDriver_1(sp, hwlabelOnOff, slk->hidden ? FALSE : TRUE);
+       CallDriver_1(sp, td_hwlabelOnOff, slk->hidden ? FALSE : TRUE);
 #else
        if (slk->hidden) {
            NCURSES_PUTP2("label_off", label_off);
index 03d52a448b0937fb7ab4900f8134400e995115f7..27e3e7f4d2d29198e6263b59f82ca7af0cd4d999 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2011,2014 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            *
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: resizeterm.c,v 1.45 2012/07/07 17:07:23 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.46 2014/03/08 20:32:59 tom Exp $")
 
 /*
  * If we're trying to be reentrant, do not want any local statics.
@@ -397,7 +397,7 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
            screen_columns(SP_PARM) = (NCURSES_SIZE_T) ToCols;
 
 #ifdef USE_TERM_DRIVER
-           CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
+           CallDriver_2(SP_PARM, td_setsize, ToLines, ToCols);
 #else
            lines = (NCURSES_SIZE_T) ToLines;
            columns = (NCURSES_SIZE_T) ToCols;
index 7deffad5ea68b8f723cd1c6029fb2ec5fa613f86..6d3a861bb2e8499a87d7598100060fb5684e1f97 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.530 2014/02/01 22:09:27 tom Exp $
+ * $Id: curses.priv.h,v 1.531 2014/03/08 19:58:54 tom Exp $
  *
  *     curses.priv.h
  *
@@ -2118,8 +2118,6 @@ extern NCURSES_EXPORT_VAR(int *) _nc_oldnums;
 
 #define USE_SETBUF_0 0
 
-#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag)
-
 #define NC_OUTPUT(sp) ((sp != 0) ? sp->_ofp : stdout)
 
 /*
@@ -2228,40 +2226,40 @@ typedef struct _termInfo
 
 typedef struct term_driver {
     bool   isTerminfo;
-    bool   (*CanHandle)(struct DriverTCB*, const char*, int*);
-    void   (*init)(struct DriverTCB*);
-    void   (*release)(struct DriverTCB*);
-    int    (*size)(struct DriverTCB*, int* Line, int *Cols);
-    int    (*sgmode)(struct DriverTCB*, int setFlag, TTY*);
-    chtype (*conattr)(struct DriverTCB*);
-    int    (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
-    int    (*mode)(struct DriverTCB*, int progFlag, int defFlag);
-    bool   (*rescol)(struct DriverTCB*);
-    bool   (*rescolors)(struct DriverTCB*);
-    void   (*color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int));
-    int    (*doBeepOrFlash)(struct DriverTCB*, int);
-    void   (*initpair)(struct DriverTCB*, int, int, int);
-    void   (*initcolor)(struct DriverTCB*, int, int, int, int);
-    void   (*docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int));
-    void   (*initmouse)(struct DriverTCB*);
-    int    (*testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*));
-    void   (*setfilter)(struct DriverTCB*);
-    void   (*hwlabel)(struct DriverTCB*, int, char*);
-    void   (*hwlabelOnOff)(struct DriverTCB*, int);
-    int    (*update)(struct DriverTCB*);
-    int    (*defaultcolors)(struct DriverTCB*, int, int);
-    int    (*print)(struct DriverTCB*, char*, int);
-    int    (*getsize)(struct DriverTCB*, int*, int*);
-    int    (*setsize)(struct DriverTCB*, int, int);
-    void   (*initacs)(struct DriverTCB*, chtype*, chtype*);
-    void   (*scinit)(SCREEN *);
-    void   (*scexit)(SCREEN *);
-    int    (*twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*));
-    int    (*read)(struct DriverTCB*, int*);
-    int    (*nap)(struct DriverTCB*, int);
-    int    (*kpad)(struct DriverTCB*, int);
-    int    (*kyOk)(struct DriverTCB*, int, int);
-    bool   (*kyExist)(struct DriverTCB*, int);
+    bool   (*td_CanHandle)(struct DriverTCB*, const char*, int*);
+    void   (*td_init)(struct DriverTCB*);
+    void   (*td_release)(struct DriverTCB*);
+    int    (*td_size)(struct DriverTCB*, int* Line, int *Cols);
+    int    (*td_sgmode)(struct DriverTCB*, int setFlag, TTY*);
+    chtype (*td_conattr)(struct DriverTCB*);
+    int    (*td_hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
+    int    (*td_mode)(struct DriverTCB*, int progFlag, int defFlag);
+    bool   (*td_rescol)(struct DriverTCB*);
+    bool   (*td_rescolors)(struct DriverTCB*);
+    void   (*td_color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int));
+    int    (*td_doBeepOrFlash)(struct DriverTCB*, int);
+    void   (*td_initpair)(struct DriverTCB*, int, int, int);
+    void   (*td_initcolor)(struct DriverTCB*, int, int, int, int);
+    void   (*td_docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int));
+    void   (*td_initmouse)(struct DriverTCB*);
+    int    (*td_testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*));
+    void   (*td_setfilter)(struct DriverTCB*);
+    void   (*td_hwlabel)(struct DriverTCB*, int, char*);
+    void   (*td_hwlabelOnOff)(struct DriverTCB*, int);
+    int    (*td_update)(struct DriverTCB*);
+    int    (*td_defaultcolors)(struct DriverTCB*, int, int);
+    int    (*td_print)(struct DriverTCB*, char*, int);
+    int    (*td_getsize)(struct DriverTCB*, int*, int*);
+    int    (*td_setsize)(struct DriverTCB*, int, int);
+    void   (*td_initacs)(struct DriverTCB*, chtype*, chtype*);
+    void   (*td_scinit)(SCREEN *);
+    void   (*td_scexit)(SCREEN *);
+    int    (*td_twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*));
+    int    (*td_read)(struct DriverTCB*, int*);
+    int    (*td_nap)(struct DriverTCB*, int);
+    int    (*td_kpad)(struct DriverTCB*, int);
+    int    (*td_kyOk)(struct DriverTCB*, int, int);
+    bool   (*td_kyExist)(struct DriverTCB*, int);
 } TERM_DRIVER;
 
 typedef struct DriverTCB
index 704eda5c9a293c19d86c20b3c424fda13296c1fa..69a1851b857571ebfa6cb02a0f143a3cd7d1d3b5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_acs.c,v 1.44 2013/01/12 17:24:42 tom Exp $")
+MODULE_ID("$Id: lib_acs.c,v 1.45 2014/03/08 20:32:59 tom Exp $")
 
 #if BROKEN_LINKER || USE_REENTRANT
 #define MyBuffer _nc_prescreen.real_acs_map
@@ -166,7 +166,7 @@ NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
     real_map['E'] = '+';       /* large plus or crossover */
 
 #ifdef USE_TERM_DRIVER
-    CallDriver_2(SP_PARM, initacs, real_map, fake_map);
+    CallDriver_2(SP_PARM, td_initacs, real_map, fake_map);
 #else
     if (ena_acs != NULL) {
        NCURSES_PUTP2("ena_acs", ena_acs);
index eaaacbcbe51f9146de687bb097ae93aa63065ea8..9941d1390629fe16dd067c21a663acd39359992b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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 <curses.priv.h>
 #include <termcap.h>           /* ospeed */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.32 2013/10/28 00:10:27 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.33 2014/03/08 20:32:59 tom Exp $")
 
 #undef CUR
 #define CUR termp->type.
@@ -151,7 +151,7 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
 #endif
 #ifdef USE_TERM_DRIVER
        if (TCB->drv)
-           TCB->drv->release(TCB);
+           TCB->drv->td_release(TCB);
 #endif
        free(termp);
 
index 36f1d25b8057b27ce88dcad24701eeef7ca4143a..df17363dd42f65efd31f69fa3ff997d2ce756f91 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 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            *
@@ -51,7 +51,7 @@
 #endif
 #endif
 
-MODULE_ID("$Id: lib_napms.c,v 1.23 2012/06/30 22:08:24 tom Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.24 2014/03/08 20:32:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
@@ -60,7 +60,7 @@ NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
 
 #ifdef USE_TERM_DRIVER
     if (HasTerminal(SP_PARM)) {
-       CallDriver_1(SP_PARM, nap, ms);
+       CallDriver_1(SP_PARM, td_nap, ms);
     }
 #else /* !USE_TERM_DRIVER */
 #if NCURSES_SP_FUNCS
index e1cda4ebb61a10f28cc9fc3ed27a6c271eb2c5a8..8e31d484bfff6691e820c30cf187be4d17b47b3c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -46,7 +46,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_options.c,v 1.76 2013/12/14 22:23:58 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.77 2014/03/08 20:32:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 idlok(WINDOW *win, bool flag)
@@ -350,7 +350,7 @@ _nc_keypad(SCREEN *sp, int flag)
 #endif
        {
 #ifdef USE_TERM_DRIVER
-           rc = CallDriver_1(sp, kpad, flag);
+           rc = CallDriver_1(sp, td_kpad, flag);
            if (rc == OK)
                sp->_keypad_on = flag;
 #else
index 946342da41db60ecb7b7ef2ca105d6becb6be327..27b9db84e5ee2b539933d45e678416db33068921 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.158 2013/06/22 19:59:08 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.159 2014/03/08 20:32:59 tom Exp $")
 
 /****************************************************************************
  *
@@ -283,7 +283,7 @@ _nc_get_screensize(SCREEN *sp,
     TCB = (TERMINAL_CONTROL_BLOCK *) termp;
 
     my_tabsize = TCB->info.tabsize;
-    TCB->drv->size(TCB, linep, colp);
+    TCB->drv->td_size(TCB, linep, colp);
 
 #if USE_REENTRANT
     if (sp != 0) {
@@ -423,7 +423,7 @@ _nc_update_screensize(SCREEN *sp)
 
     assert(sp != 0);
 
-    CallDriver_2(sp, getsize, &old_lines, &old_cols);
+    CallDriver_2(sp, td_getsize, &old_lines, &old_cols);
 
 #else
     TERMINAL *termp = cur_term;
@@ -763,7 +763,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
 #ifdef USE_TERM_DRIVER
     *tp = termp;
     NCURSES_SP_NAME(set_curterm) (sp, termp);
-    TCB->drv->init(TCB);
+    TCB->drv->td_init(TCB);
 #else
     sp = SP;
 #endif
index 700ec481271fd56dff9fa79be859575050c0eba6..14eaf943f743f15e9b6c2f75d01f7251f9cb7c20 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 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            *
@@ -41,7 +41,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_ttyflags.c,v 1.28 2012/01/21 19:21:29 KO.Myung-Hun Exp $")
+MODULE_ID("$Id: lib_ttyflags.c,v 1.29 2014/03/08 20:32:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
@@ -57,7 +57,7 @@ NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
            result = ERR;
        } else {
 #ifdef USE_TERM_DRIVER
-           result = CallDriver_2(SP_PARM, sgmode, FALSE, buf);
+           result = CallDriver_2(SP_PARM, td_sgmode, FALSE, buf);
 #else
            for (;;) {
                if (GET_TTY(termp->Filedes, buf) != 0) {
@@ -102,7 +102,7 @@ NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_DCLx TTY * buf)
            result = ERR;
        } else {
 #ifdef USE_TERM_DRIVER
-           result = CallDriver_2(SP_PARM, sgmode, TRUE, buf);
+           result = CallDriver_2(SP_PARM, td_sgmode, TRUE, buf);
 #else
            for (;;) {
                if ((SET_TTY(termp->Filedes, buf) != 0)
@@ -145,7 +145,7 @@ NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
-       rc = CallDriver_2(SP_PARM, mode, FALSE, TRUE);
+       rc = CallDriver_2(SP_PARM, td_mode, FALSE, TRUE);
 #else
        /*
         * If XTABS was on, remove the tab and backtab capabilities.
@@ -183,7 +183,7 @@ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_DCL0)
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
-       rc = CallDriver_2(SP_PARM, mode, TRUE, TRUE);
+       rc = CallDriver_2(SP_PARM, td_mode, TRUE, TRUE);
 #else
        /*
         * Turn off the XTABS bit in the tty structure if it was on.
@@ -219,13 +219,12 @@ NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_DCL0)
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
-       rc = CallDriver_2(SP_PARM, mode, TRUE, FALSE);
+       rc = CallDriver_2(SP_PARM, td_mode, TRUE, FALSE);
 #else
        if (_nc_set_tty_mode(&termp->Nttyb) == OK) {
            if (SP_PARM) {
                if (SP_PARM->_keypad_on)
                    _nc_keypad(SP_PARM, TRUE);
-               NC_BUFFERED(SP_PARM, TRUE);
            }
            rc = OK;
        }
@@ -252,12 +251,11 @@ NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_DCL0)
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
-       rc = CallDriver_2(SP_PARM, mode, FALSE, FALSE);
+       rc = CallDriver_2(SP_PARM, td_mode, FALSE, FALSE);
 #else
        if (SP_PARM) {
            _nc_keypad(SP_PARM, FALSE);
            _nc_flush();
-           NC_BUFFERED(SP_PARM, FALSE);
        }
        rc = _nc_set_tty_mode(&termp->Ottyb);
 #endif
index 435b0b5d4aef64b7848647191d51d1e4a6d87bf1..81b8180d54854099f936c8bb8a2dcb492e75fac1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -41,7 +41,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.126 2013/12/15 00:35:36 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.127 2014/03/08 22:07:31 Xin.Li Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -114,6 +114,7 @@ fake_read(char *src, int *offset, int limit, char *dst, unsigned want)
 
 #define even_boundary(value) \
     if ((value) % 2 != 0) Read(buf, 1)
+#endif
 
 NCURSES_EXPORT(void)
 _nc_init_termtype(TERMTYPE *const tp)
@@ -145,6 +146,7 @@ _nc_init_termtype(TERMTYPE *const tp)
        tp->Strings[i] = ABSENT_STRING;
 }
 
+#if NCURSES_USE_DATABASE
 /*
  * Return TGETENT_YES if read, TGETENT_NO if not found or garbled.
  */
index 11431996f8022cc05ab9a2f14aa16e0511dbb657..e36541f331f000b4bfb28ec98c1a7547382a757f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2008-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 2008-2013,2014 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            *
@@ -50,7 +50,7 @@
 # endif
 #endif
 
-MODULE_ID("$Id: tinfo_driver.c,v 1.32 2013/08/31 15:22:46 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.33 2014/03/08 20:33:38 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -537,7 +537,6 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
                if (sp) {
                    if (sp->_keypad_on)
                        _nc_keypad(sp, TRUE);
-                   NC_BUFFERED(sp, TRUE);
                }
                code = OK;
            }
@@ -563,7 +562,6 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
            if (sp) {
                _nc_keypad(sp, FALSE);
                NCURSES_SP_NAME(_nc_flush) (sp);
-               NC_BUFFERED(sp, FALSE);
            }
            code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
        }
@@ -665,7 +663,7 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
      * baudrate.
      */
     if (isatty(trm->Filedes)) {
-       TCB->drv->mode(TCB, TRUE, TRUE);
+       TCB->drv->td_mode(TCB, TRUE, TRUE);
     }
 }
 
@@ -868,11 +866,11 @@ drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB,
     } else
 #endif
     {
-       rc = TCBOf(sp)->drv->twait(TCBOf(sp),
-                                  TWAIT_MASK,
-                                  delay,
-                                  (int *) 0
-                                  EVENTLIST_2nd(evl));
+       rc = TCBOf(sp)->drv->td_twait(TCBOf(sp),
+                                     TWAIT_MASK,
+                                     delay,
+                                     (int *) 0
+                                     EVENTLIST_2nd(evl));
 #if USE_SYSMOUSE
        if ((sp->_mouse_type == M_SYSMOUSE)
            && (sp->_sysmouse_head < sp->_sysmouse_tail)
index 2ea04c58a8f292dec8e676a3e65ba511cbe110d6..2288769a04c1ac0e1ded49f60135062052bfeb5f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mvcur.c,v 1.133 2013/05/25 23:59:41 tom Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.134 2014/03/08 20:32:59 tom Exp $")
 
 #define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x]    /* desired state */
 
@@ -1187,7 +1187,6 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     baudrate();
 
     _nc_mvcur_init();
-    NC_BUFFERED(FALSE);
 
     (void) puts("The mvcur tester.  Type ? for help");
 
index 2f70550fb578923a988507376ae70798e18f132d..59942f771fddaea49dea2ab2a651e3c886263f10 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -75,7 +75,7 @@
 #endif
 #undef CUR
 
-MODULE_ID("$Id: lib_twait.c,v 1.67 2013/02/18 09:22:27 tom Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.68 2014/03/08 20:32:59 tom Exp $")
 
 static long
 _nc_gettime(TimeType * t0, int first)
@@ -102,7 +102,7 @@ _nc_gettime(TimeType * t0, int first)
     if (first) {
        *t0 = t1;
     }
-    res = (t1 - *t0) * 1000;
+    res = (long) ((t1 - *t0) * 1000);
 #endif
     TR(TRACE_IEVENT, ("%s time: %ld msec", first ? "get" : "elapsed", res));
     return res;
index 0846d8485f423b0cfb8d5ad0ccb95aeffce34acf..2d9c97b7c226f72fc906e688b79aef7158aba0d1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -69,7 +69,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_vidattr.c,v 1.67 2013/08/31 20:08:59 tom Exp $")
+MODULE_ID("$Id: lib_vidattr.c,v 1.68 2014/03/08 20:32:59 tom Exp $")
 
 #define doPut(mode) \
        TPUTS_TRACE(#mode); \
@@ -368,7 +368,7 @@ NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
 
     if (HasTerminal(SP_PARM)) {
 #ifdef USE_TERM_DRIVER
-       attrs = CallDriver(SP_PARM, conattr);
+       attrs = CallDriver(SP_PARM, td_conattr);
 #else /* ! USE_TERM_DRIVER */
 
        if (enter_alt_charset_mode)
index c664d92387cc85a9608b7dd3dcbe37006c923cd3..bcb24f02e7aa61c8f1e0f0c1f310546c87626835 100644 (file)
 
 /****************************************************************************
  *  Author: Juergen Pfeifer                                                 *
+ *     and: Thomas E. Dickey                                                *
  ****************************************************************************/
 
 /*
  * TODO - GetMousePos(POINT * result) from ntconio.c
  * TODO - implement nodelay
- * TODO - when $NCGDB is set, implement non-buffered output, like PDCurses
  */
 
 #include <curses.priv.h>
 #define CUR my_term.type.
 
-MODULE_ID("$Id: win_driver.c,v 1.24 2014/02/23 01:23:29 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.28 2014/03/08 21:44:53 tom Exp $")
 
 #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
 
@@ -79,7 +79,8 @@ typedef struct props {
     DWORD map[MAPSIZE];
     DWORD rmap[MAPSIZE];
     WORD pairs[NUMPAIRS];
-    bool buffered;
+    bool buffered;             /* normally allocate console-buffer */
+    bool window_only;          /* ..if not, we save buffer or window-only */
     COORD origin;
     CHAR_INFO *save_screen;
 } Properties;
@@ -125,16 +126,22 @@ MapAttr(TERMINAL_CONTROL_BLOCK * TCB, WORD res, attr_t ch)
        if (p > 0 && p < NUMPAIRS && TCB != 0 && sp != 0) {
            WORD a;
            a = PropOf(TCB)->pairs[p];
-           res = (res & 0xff00) | a;
+           res = (WORD) ((res & 0xff00) | a);
        }
     }
 
-    if (ch & A_REVERSE)
-       res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4)));
+    if (ch & A_REVERSE) {
+       res = (WORD) ((res & 0xff00) |
+                     (((res & 0x07) << 4) |
+                      ((res & 0x70) >> 4)));
+    }
 
-    if (ch & A_STANDOUT)
-       res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4))
-              | BACKGROUND_INTENSITY);
+    if (ch & A_STANDOUT) {
+       res = (WORD) ((res & 0xff00) |
+                     (((res & 0x07) << 4) |
+                      ((res & 0x70) >> 4)) |
+                     BACKGROUND_INTENSITY);
+    }
 
     if (ch & A_BOLD)
        res |= FOREGROUND_INTENSITY;
@@ -336,6 +343,42 @@ selectActiveHandle(TERMINAL_CONTROL_BLOCK * TCB)
     }
 }
 
+static bool
+restore_original_screen(TERMINAL_CONTROL_BLOCK * TCB)
+{
+    COORD bufferCoord;
+    SMALL_RECT writeRegion;
+    Properties *p = PropOf(TCB);
+    bool result = FALSE;
+
+    if (p->window_only) {
+       writeRegion.Top = p->SBI.srWindow.Top;
+       writeRegion.Left = p->SBI.srWindow.Left;
+       writeRegion.Bottom = p->SBI.srWindow.Bottom;
+       writeRegion.Right = p->SBI.srWindow.Right;
+       T(("... restoring window"));
+    } else {
+       writeRegion.Top = 0;
+       writeRegion.Left = 0;
+       writeRegion.Bottom = (SHORT) (p->SBI.dwSize.Y - 1);
+       writeRegion.Right = (SHORT) (p->SBI.dwSize.X - 1);
+       T(("... restoring entire buffer"));
+    }
+
+    bufferCoord.X = bufferCoord.Y = 0;
+
+    if (WriteConsoleOutput(TCB->hdl,
+                          p->save_screen,
+                          p->SBI.dwSize,
+                          bufferCoord,
+                          &writeRegion)) {
+       result = TRUE;
+       mvcur(-1, -1, LINES - 2, 0);
+    }
+    T(("... restore original screen contents %s", result ? "ok" : "err"));
+    return result;
+}
+
 static int
 drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
 {
@@ -446,9 +489,9 @@ drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
            CurScreen(sp)->_curx = NewScreen(sp)->_curx;
            CurScreen(sp)->_cury = NewScreen(sp)->_cury;
 
-           TCB->drv->hwcur(TCB,
-                           0, 0,
-                           CurScreen(sp)->_cury, CurScreen(sp)->_curx);
+           TCB->drv->td_hwcur(TCB,
+                              0, 0,
+                              CurScreen(sp)->_cury, CurScreen(sp)->_curx);
        }
        selectActiveHandle(TCB);
        result = OK;
@@ -738,6 +781,7 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
     AssertTCB();
     sp = TCB->csp;
 
+    T((T_CALLED("win32con::drv_mode(%p, prog=%d, def=%d)"), TCB, progFlag, defFlag));
     PropOf(TCB)->progMode = progFlag;
     PropOf(TCB)->lastOut = progFlag ? TCB->hdl : TCB->out;
     SetConsoleActiveScreenBuffer(PropOf(TCB)->lastOut);
@@ -754,7 +798,6 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
                if (sp) {
                    if (sp->_keypad_on)
                        _nc_keypad(sp, TRUE);
-                   NC_BUFFERED(sp, TRUE);
                }
                code = OK;
            }
@@ -770,9 +813,12 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
            if (sp) {
                _nc_keypad(sp, FALSE);
                NCURSES_SP_NAME(_nc_flush) (sp);
-               NC_BUFFERED(sp, FALSE);
            }
            code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
+           if (!PropOf(TCB)->buffered) {
+               if (!restore_original_screen(TCB))
+                   code = ERR;
+           }
        }
     }
 
@@ -919,6 +965,7 @@ save_original_screen(TERMINAL_CONTROL_BLOCK * TCB)
                                      bufferCoord,
                                      &readRegion)) {
                    result = TRUE;
+                   p->window_only = TRUE;
                } else {
                    T((" error %#lx", (unsigned long) GetLastError()));
                }
@@ -951,7 +998,7 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
        TCB->inp = GetStdHandle(STD_INPUT_HANDLE);
        TCB->out = GetStdHandle(STD_OUTPUT_HANDLE);
 
-       if (getenv("NCGDB")) {
+       if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
            TCB->hdl = TCB->out;
            buffered = FALSE;
        } else {
@@ -966,6 +1013,7 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
            returnVoid;
        } else if ((TCB->prop = typeCalloc(Properties, 1)) != 0) {
            PropOf(TCB)->buffered = buffered;
+           PropOf(TCB)->window_only = FALSE;
            if (!get_SBI(TCB)) {
                FreeAndNull(TCB->prop);         /* force error in drv_size */
                returnVoid;
@@ -1005,7 +1053,7 @@ drv_init(TERMINAL_CONTROL_BLOCK * TCB)
                PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] = (DWORD) keylist[i];
            else
                PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] =
-                   GenMap((VK_F1 + (i - N_INI)), (KEY_F(1) + (i - N_INI)));
+                   (DWORD) GenMap((VK_F1 + (i - N_INI)), (KEY_F(1) + (i - N_INI)));
        }
        qsort(PropOf(TCB)->map,
              (size_t) (MAPSIZE),
@@ -1090,11 +1138,11 @@ drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
     if (sp->_drv_mouse_head < sp->_drv_mouse_tail) {
        rc = TW_MOUSE;
     } else {
-       rc = TCBOf(sp)->drv->twait(TCBOf(sp),
-                                  TWAIT_MASK,
-                                  delay,
-                                  (int *) 0
-                                  EVENTLIST_2nd(evl));
+       rc = TCBOf(sp)->drv->td_twait(TCBOf(sp),
+                                     TWAIT_MASK,
+                                     delay,
+                                     (int *) 0
+                                     EVENTLIST_2nd(evl));
     }
 
     return rc;
index fe1ff2f2dc07526f20eb40611d1255f37ecbe516..13be3173c98b460cff09c1cf46945c6eb322278a 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140301) unstable; urgency=low
+ncurses6 (5.9-20140308) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Mar 2014 09:32:51 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Mar 2014 14:20:13 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index fe1ff2f2dc07526f20eb40611d1255f37ecbe516..13be3173c98b460cff09c1cf46945c6eb322278a 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140301) unstable; urgency=low
+ncurses6 (5.9-20140308) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Mar 2014 09:32:51 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Mar 2014 14:20:13 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index e0705e82184b95b68ff2a36378d65a49baa1d32a..3f7600ad78cd89880829e543a62845015cdb69b6 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140301) unstable; urgency=low
+ncurses6 (5.9-20140308) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Mar 2014 09:32:51 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Mar 2014 14:20:13 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 51907df3831a619a0078e6fe9a7454fe460e29d1..a5b989f4dbd521188e67074e827965aae6a9cee0 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.29 2014/03/01 14:32:51 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.30 2014/03/08 19:20:13 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "0301"\r
+!define VERSION_MMDD  "0308"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index a1116fd282d93453a77aa62f31abbee896d85a64..85ed94f76b68cc9dc3b5dbb8ce3d981c816a8e33 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20140301
+Release: 20140308
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index b06a6450d826e3a398678d93a1f1955e0350dea3..a01506d10520539737f78a32fe2be5e8a015aa11 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20140301
+Release: 20140308
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz