]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.6 - patch 20080628
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 29 Jun 2008 00:12:36 +0000 (00:12 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 29 Jun 2008 00:12:36 +0000 (00:12 +0000)
+ correct some ifdef's needed for the broken-linker configuration.
+ make debugging library's $BAUDRATE feature work for termcap
  interface.
+ make $NCURSES_NO_PADDING feature work for termcap interface (prompted
  by comment on FreeBSD mailing list).
+ add screen.mlterm terminfo entry -TD
+ improve mlterm and mlterm+pcfkeys terminfo entries -TD

24 files changed:
NEWS
configure.in
dist.mk
misc/terminfo.src
ncurses/base/lib_getch.c
ncurses/base/lib_set_term.c
ncurses/curses.priv.h
ncurses/fifo_defs.h
ncurses/llib-lncurses
ncurses/llib-lncursest
ncurses/llib-lncursesw
ncurses/tinfo/MKcodes.awk
ncurses/tinfo/MKnames.awk
ncurses/tinfo/entries.c
ncurses/tinfo/lib_baudrate.c
ncurses/tinfo/lib_cur_term.c
ncurses/tinfo/lib_data.c
ncurses/tinfo/lib_options.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_termcap.c
ncurses/tinfo/lib_tputs.c
ncurses/trace/lib_tracechr.c
ncurses/tty/lib_mvcur.c
test/README

diff --git a/NEWS b/NEWS
index 2f027f4fab10c3f84ebed2b3f610710699eb93a4..71714e34c2ef41081ff9588b542155e0c6a5462b 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.1248 2008/06/21 23:26:56 tom Exp $
+-- $Id: NEWS,v 1.1252 2008/06/28 23:37:53 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,15 @@ 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.
 
+20080628
+       + correct some ifdef's needed for the broken-linker configuration.
+       + make debugging library's $BAUDRATE feature work for termcap
+         interface.
+       + make $NCURSES_NO_PADDING feature work for termcap interface (prompted
+         by comment on FreeBSD mailing list).
+       + add screen.mlterm terminfo entry -TD
+       + improve mlterm and mlterm+pcfkeys terminfo entries -TD
+
 20080621
        + regenerated html documentation.
        + expand manpage description of parameters for form_driver() and
index 1a4a0c86ecac6e8518a798662257bfb812cc885c..baa4c415ad75ec2a2f40d24e1551e105204ac8fa 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.434 2008/05/17 19:50:19 tom Exp $
+dnl $Id: configure.in,v 1.435 2008/06/28 15:52:20 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.13.20020210)
-AC_REVISION($Revision: 1.434 $)
+AC_REVISION($Revision: 1.435 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
diff --git a/dist.mk b/dist.mk
index 044ba6475994a3b1ed4e09e3891ac92a46ed7e29..e28c4f101ebc6e9cd10de2ea6a2e938776a167cf 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.647 2008/06/21 15:45:19 tom Exp $
+# $Id: dist.mk,v 1.648 2008/06/28 11:37:48 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 = 6
-NCURSES_PATCH = 20080621
+NCURSES_PATCH = 20080628
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 8627cece61c9d94601899b2ced23010454701146..cdb2a4b84a8b422f7484219a2868b82f0e842cfd 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.328 $
-#      $Date: 2008/04/29 00:49:41 $
+#      $Revision: 1.330 $
+#      $Date: 2008/06/28 17:22:46 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -3671,7 +3671,7 @@ konsole-256color|KDE console window with xterm 256-colors,
 #      control                 kf1 to kf12     \E[11;5~ to \E[24;5~ (maybe)
 #      control/shift           kf1 to kf12     \E[11;6~ to \E[24;6~
 #      control/alt             kf1 to kf12     \E[11;7~ to \E[24;7~
-#      control/shit/alt        kf1 to kf12     \E[11;8~ to \E[24;8~
+#      control/shift/alt       kf1 to kf12     \E[11;8~ to \E[24;8~
 #
 mlterm|multi lingual terminal emulator,
        am, eslok, km, mc5i, mir, msgr, npc, xenl,
@@ -3687,10 +3687,11 @@ mlterm|multi lingual terminal emulator,
        home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
        ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
        is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
-       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-       kdch1=\E[3~, kend=\EOF, kent=\EOM, kfnd=\E[1~, khome=\EOH,
-       kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~,
-       mc0=\E[i, nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
+       kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kfnd=\E[1~,
+       khome=\EOH, kich1=\E[2~, kind=\EO1;2B, kmous=\E[M,
+       knp=\E[6~, kpp=\E[5~, kri=\EO1;2A, kslt=\E[4~, mc0=\E[i,
+       nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
        rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
        rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l,
@@ -3706,11 +3707,14 @@ mlterm|multi lingual terminal emulator,
 # (when available), it could use the extended names introduced for xterm.
 mlterm+pcfkeys|fragment for PC-style fkeys,
        kLFT=\EO1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO1;2C,
-       kDN=\EO1;2B, kDN5=\EO1;5B, kDN6=\EO1;6B, kIC5=\E[2;5~,
-       kIC6=\E[2;6~, kLFT5=\EO1;5D, kLFT6=\EO1;6D,
-       kNXT5=\E[6;5~, kNXT6=\E[6;6~, kPRV5=\E[5;5~,
-       kPRV6=\E[5;6~, kRIT5=\EO1;5C, kRIT6=\EO1;6C, kUP=\EO1;2A,
-       kUP5=\EO1;5A, kUP6=\EO1;6A,
+       kDN=\EO1;2B, kDN3=\EO1;3B, kDN4=\EO1;4B, kDN5=\EO1;5B,
+       kDN6=\EO1;6B, kDN7=\EO1;7B, kIC5=\E[2;5~, kIC6=\E[2;6~,
+       kLFT3=\EO1;3D, kLFT4=\EO1;4D, kLFT5=\EO1;5D,
+       kLFT6=\EO1;6D, kLFT7=\EO1;7D, kNXT5=\E[6;5~,
+       kNXT6=\E[6;6~, kPRV5=\E[5;5~, kPRV6=\E[5;6~,
+       kRIT3=\EO1;3C, kRIT4=\EO1;4C, kRIT5=\EO1;5C,
+       kRIT6=\EO1;6C, kRIT7=\EO1;7C, kUP=\EO1;2A, kUP3=\EO1;3A,
+       kUP4=\EO1;4A, kUP5=\EO1;5A, kUP6=\EO1;6A, kUP7=\EO1;7A,
 
 # From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
 # Updated: Oezguer Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
@@ -4407,6 +4411,8 @@ screen.rxvt|screen in rxvt,
 screen.linux|screen in linux console,
        bw,
        kbs=\177, kcbt@, use=screen+fkeys, use=screen,
+screen.mlterm|screen in mlterm,
+       use=screen+fkeys, use=mlterm,
 
 screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
        cols#132, use=screen,
@@ -21679,6 +21685,10 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 2008-04-28
 #      * add screen+fkeys (prompted by Debian # 478094) -TD
 #
+# 2008-06-28
+#      * add screen.mlterm -TD
+#      * improve mlterm and mlterm+pcfkeys -TD
+#
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"
index 372d4ac7b2a830e7d9d1cb04d236d168ac614c72..56e2a3a874d1de3d1f3efc021493b19f7527c3f0 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.95 2008/06/07 15:52:51 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.96 2008/06/28 23:29:20 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -266,9 +266,9 @@ recur_wrefresh(WINDOW *win)
        /* temporarily switch to the window's screen to check/refresh */
        _nc_lock_global(curses);
        save_SP = SP;
-       SP = sp;
+       _nc_set_screen(sp);
        recur_wrefresh(win);
-       SP = save_SP;
+       _nc_set_screen(save_SP);
        _nc_unlock_global(curses);
     } else
 #endif
@@ -291,9 +291,9 @@ recur_wgetnstr(WINDOW *win, char *buf)
        /* temporarily switch to the window's screen to get cooked input */
        _nc_lock_global(curses);
        save_SP = SP;
-       SP = sp;
+       _nc_set_screen(sp);
        rc = recur_wgetnstr(win, buf);
-       SP = save_SP;
+       _nc_set_screen(save_SP);
        _nc_unlock_global(curses);
     } else
 #endif
index 46779e08f1e1668d448e5c9dcd9fd0895e47607d..6fbf6ad76f4f6c80e0abe4167ecd0b7d282da7c4 100644 (file)
@@ -44,7 +44,7 @@
 #include <term.h>              /* cur_term */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_set_term.c,v 1.113 2008/06/21 19:00:09 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.115 2008/06/28 15:33:52 tom Exp $")
 
 NCURSES_EXPORT(SCREEN *)
 set_term(SCREEN *screenp)
@@ -322,11 +322,7 @@ _nc_setupscreen(int slines GCC_UNUSED,
     SP->_ofp = output;
     SP->_cursor = -1;          /* cannot know real cursor shape */
 
-#if NCURSES_NO_PADDING
-    SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0;
-    TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used",
-                                   SP->_no_padding ? " not" : ""));
-#endif
+    SetNoPadding(SP);
 
 #if NCURSES_EXT_FUNCS
     SP->_default_color = FALSE;
@@ -516,7 +512,7 @@ _nc_setupscreen(int slines GCC_UNUSED,
 
     /* initialize normal acs before wide, since we use mapping in the latter */
 #if !USE_WIDEC_SUPPORT
-    if (_nc_unicode_locale() && _nc_locale_breaks_acs()) {
+    if (_nc_unicode_locale() && _nc_locale_breaks_acs(cur_term)) {
        acs_chars = NULL;
        ena_acs = NULL;
        enter_alt_charset_mode = NULL;
@@ -528,7 +524,8 @@ _nc_setupscreen(int slines GCC_UNUSED,
 #if USE_WIDEC_SUPPORT
     _nc_init_wacs();
 
-    SP->_screen_acs_fix = (_nc_unicode_locale() && _nc_locale_breaks_acs());
+    SP->_screen_acs_fix = (_nc_unicode_locale()
+                          && _nc_locale_breaks_acs(cur_term));
 #endif
     env = _nc_get_locale();
     SP->_legacy_coding = ((env == 0)
index e609c1330fed81dcc5303498bee69ecc1fe47e9f..c6fda33d745d77961c6088da4c9c55dc828fbd87 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.383 2008/06/07 14:13:19 tom Exp $
+ * $Id: curses.priv.h,v 1.386 2008/06/28 15:27:47 tom Exp $
  *
  *     curses.priv.h
  *
@@ -286,6 +286,15 @@ color_t;
 #define VIDATTR(attr, pair)    vidattr(attr)
 #endif
 
+#if NCURSES_NO_PADDING
+#define GetNoPadding(sp)       ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding)
+#define SetNoPadding(sp)       _nc_set_no_padding(sp)
+extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *);
+#else
+#define GetNoPadding(sp)       FALSE
+#define SetNoPadding(sp)       /*nothing*/
+#endif
+
 #define WINDOW_ATTRS(w)                ((w)->_attrs)
 
 #define SCREEN_ATTRS(s)                (*((s)->_current_attr))
@@ -630,6 +639,9 @@ typedef struct {
        ripoff_t        *rsp;
        TPARM_STATE     tparm_state;
        TTY             *saved_tty;     /* savetty/resetty information      */
+#if NCURSES_NO_PADDING
+       bool            _no_padding;    /* flag to set if padding disabled  */
+#endif
 #if BROKEN_LINKER || USE_REENTRANT
        chtype          *real_acs_map;
        int             _LINES;
@@ -700,7 +712,7 @@ struct screen {
        int             slk_format;     /* selected format for this screen  */
        /* cursor movement costs; units are 10ths of milliseconds */
 #if NCURSES_NO_PADDING
-       int             _no_padding;    /* flag to set if padding disabled  */
+       bool            _no_padding;    /* flag to set if padding disabled  */
 #endif
        int             _char_padding;  /* cost of character put            */
        int             _cr_cost;       /* cost of (carriage_return)        */
@@ -1477,7 +1489,7 @@ extern NCURSES_EXPORT(int) _nc_has_mouse (void);
 /* lib_setup.c */
 extern NCURSES_EXPORT(char *) _nc_get_locale(void);
 extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
-extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(void);
+extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *);
 extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
 extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
 
index 9655b417d6e73ccc20eb77fe5f6fbf4a141492e4..fa9ae226463500122d51125a50f46a370dc85fc9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2002 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2002,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
 /*
  * Common macros for lib_getch.c, lib_ungetch.c
  *
- * $Id: fifo_defs.h,v 1.5 2008/05/03 20:08:16 tom Exp $
+ * $Id: fifo_defs.h,v 1.6 2008/06/28 15:52:32 tom Exp $
  */
 
 #ifndef FIFO_DEFS_H
index 485014d96854b2b8be10a7f80c9eec673e3e248c..e1b439db5aa9dd77f6ed1198b36b9991f7070342 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -2661,7 +2661,8 @@ int       _nc_unicode_locale(void)
                { return(*(int *)0); }
 
 #undef _nc_locale_breaks_acs
-int    _nc_locale_breaks_acs(void)
+int    _nc_locale_breaks_acs(
+               TERMINAL *termp)
                { return(*(int *)0); }
 
 #undef _nc_setupterm
index 906da60682873ac9525ab7ea28d6b11157023ee8..4d87ae4239a1b6dabfb22ee11ac65175096e0a62 100644 (file)
@@ -2718,7 +2718,8 @@ int       _nc_unicode_locale(void)
                { return(*(int *)0); }
 
 #undef _nc_locale_breaks_acs
-int    _nc_locale_breaks_acs(void)
+int    _nc_locale_breaks_acs(
+               TERMINAL *termp)
                { return(*(int *)0); }
 
 #undef _nc_setupterm
index 50f571456d7aa6ab87991b2247ec0bd069ec5a5b..707beb3980d0201ebd11a354281d73492487e271 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2005,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -3407,7 +3407,8 @@ int       _nc_unicode_locale(void)
                { return(*(int *)0); }
 
 #undef _nc_locale_breaks_acs
-int    _nc_locale_breaks_acs(void)
+int    _nc_locale_breaks_acs(
+               TERMINAL *termp)
                { return(*(int *)0); }
 
 #undef _nc_setupterm
index db8ad5541841a376d9fcb755d751f9470f2c08a6..b9ba636e0ccdcd021a77991048dbb0b11396aa28 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKcodes.awk,v 1.4 2007/11/03 20:24:15 tom Exp $
+# $Id: MKcodes.awk,v 1.5 2008/06/28 23:13:25 tom Exp $
 function large_item(value) {
        result = sprintf("%d,", offset);
        offset = offset + length(value) + 1;
@@ -140,6 +140,7 @@ END {
                print  ""
                print  "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
                print  ""
+               print  "#if NO_LEAKS"
                print  "NCURSES_EXPORT(void)"
                print  "_nc_codes_leaks(void)"
                print  "{"
@@ -149,6 +150,8 @@ END {
                print  "FREE_FIX(strcodes)"
                }
                print  "}"
+               print  "#endif"
+               print  ""
                print  "#else"
                print  ""
                print  "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]"
index 93e682c2d28db529f9a8cd7ca0e263a8827ca969..1fbb163bcff6132b2fa982dff7cb7830755a4140 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 2007 Free Software Foundation, Inc.                          #
+# Copyright (c) 2007,2008 Free Software Foundation, Inc.                     #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKnames.awk,v 1.18 2007/11/03 20:24:15 tom Exp $
+# $Id: MKnames.awk,v 1.19 2008/06/28 23:13:13 tom Exp $
 function large_item(value) {
        result = sprintf("%d,", offset);
        offset = offset + length(value) + 1;
@@ -156,6 +156,7 @@ END {
                print  ""
                print  "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
                print  ""
+               print  "#if NO_LEAKS"
                print  "NCURSES_EXPORT(void)"
                print  "_nc_names_leaks(void)"
                print  "{"
@@ -168,6 +169,8 @@ END {
                print  "FREE_FIX(strfnames)"
                }
                print  "}"
+               print  "#endif"
+               print  ""
                print  "#else"
                print  ""
                print  "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]"
index 05f45ef0484ccf1d6602e9103b7de28aa8a12442..0a43a17f3e96cd38aa14256bd76b35b103a3cff6 100644 (file)
@@ -37,7 +37,7 @@
 #include <tic.h>
 #include <term_entry.h>
 
-MODULE_ID("$Id: entries.c,v 1.6 2008/06/21 21:25:01 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.7 2008/06/28 23:08:51 tom Exp $")
 
 /****************************************************************************
  *
@@ -111,19 +111,18 @@ _nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
 NCURSES_EXPORT(void)
 _nc_leaks_tinfo(void)
 {
+#if NO_LEAKS
     char *s;
+#endif
 
     T((T_CALLED("_nc_free_tinfo()")));
 #if NO_LEAKS
     _nc_free_tparm();
     _nc_tgetent_leaks();
-#endif
     _nc_free_entries(_nc_head);
     _nc_get_type(0);
     _nc_first_name(0);
-#if NO_LEAKS
     _nc_keyname_leaks();
-#endif
 #if BROKEN_LINKER || USE_REENTRANT
     _nc_names_leaks();
     _nc_codes_leaks();
@@ -135,6 +134,7 @@ _nc_leaks_tinfo(void)
 
     if ((s = _nc_home_terminfo()) != 0)
        free(s);
+#endif /* NO_LEAKS */
     returnVoid;
 }
 
index 28405bee3336b1d4186dcfe2583328eeb7e3808a..b9cdfda9acced7bebc28da3b3add4be759651177 100644 (file)
@@ -80,7 +80,7 @@
 #undef USE_OLD_TTY
 #endif /* USE_OLD_TTY */
 
-MODULE_ID("$Id: lib_baudrate.c,v 1.26 2008/06/21 20:46:10 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.27 2008/06/28 15:19:24 tom Exp $")
 
 /*
  *     int
@@ -207,7 +207,7 @@ baudrate(void)
      * that take into account costs that depend on baudrate.
      */
 #ifdef TRACE
-    if (SP && !isatty(fileno(SP->_ofp))
+    if (!isatty(fileno(SP ? SP->_ofp : stdout))
        && getenv("BAUDRATE") != 0) {
        int ret;
        if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
index d0aad633dd287340bfa5d9197d89fc61eee6d9dc..ce8868e746f9e16367a87b96dd24e6d008f59d43 100644 (file)
 #include <term_entry.h>                /* TTY, cur_term */
 #include <termcap.h>           /* ospeed */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.16 2008/06/07 22:22:16 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.17 2008/06/28 22:59:22 tom Exp $")
 
 #undef CUR
 #define CUR termp->type.
 
-#if USE_REENTRANT
+#if BROKEN_LINKER || USE_REENTRANT
 NCURSES_EXPORT(TERMINAL *)
 NCURSES_PUBLIC_VAR(cur_term) (void)
 {
@@ -66,7 +66,7 @@ set_curterm(TERMINAL * termp)
     oldterm = cur_term;
     if (SP)
        SP->_term = termp;
-#if USE_REENTRANT
+#if BROKEN_LINKER || USE_REENTRANT
     _nc_prescreen._cur_term = termp;
 #else
     cur_term = termp;
index f09ad226f99c9eacce470a08a919d18087bb0341..d959509e69f3beb76afb99dbd01049134de9613c 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_data.c,v 1.48 2008/06/07 14:03:15 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.49 2008/06/28 12:46:53 tom Exp $")
 
 /*
  * OS/2's native linker complains if we don't initialize public data when
@@ -217,6 +217,9 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
        NUM_VARS_0s,            /* static_vars */
     },
     NULL,                      /* saved_tty */
+#if NCURSES_NO_PADDING
+    FALSE,                     /* flag to set if padding disabled  */
+#endif
 #if BROKEN_LINKER || USE_REENTRANT
     NULL,                      /* real_acs_map */
     0,                         /* LINES */
index c633d468a8c518d6f6c58194ef31c6ad313f78ea..eb170354f4dc630e15509c8799edd4d4ac26f797 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <term.h>
 
-MODULE_ID("$Id: lib_options.c,v 1.56 2008/06/07 14:01:46 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.57 2008/06/28 23:31:15 tom Exp $")
 
 static int _nc_curs_set(SCREEN *, int);
 static int _nc_meta(SCREEN *, bool);
@@ -251,9 +251,9 @@ _nc_keypad(SCREEN *sp, bool flag)
            /* cannot use use_screen(), since that is not in tinfo library */
            _nc_lock_global(curses);
            save_sp = SP;
-           SP = sp;
+           _nc_set_screen(sp);
            rc = _nc_keypad(sp, flag);
-           SP = save_sp;
+           _nc_set_screen(save_sp);
            _nc_unlock_global(curses);
        } else
 #endif
index 967d42a8677156416f4cffb42bf7c7522dc928e8..20c14e0fcf7febbc7add1935183548444b031af7 100644 (file)
@@ -53,7 +53,7 @@
 
 #include <term.h>              /* lines, columns, cur_term */
 
-MODULE_ID("$Id: lib_setup.c,v 1.108 2008/06/21 21:00:18 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.109 2008/06/28 15:31:42 tom Exp $")
 
 /****************************************************************************
  *
@@ -99,6 +99,12 @@ MODULE_ID("$Id: lib_setup.c,v 1.108 2008/06/21 21:00:18 tom Exp $")
 # endif
 #endif
 
+/*
+ * Reduce explicit use of "cur_term" global variable.
+ */
+#undef CUR
+#define CUR termp->type.
+
 /*
  * Wrap global variables in this module.
  */
@@ -193,6 +199,7 @@ NCURSES_EXPORT(void)
 _nc_get_screensize(SCREEN *sp, int *linep, int *colp)
 /* Obtain lines/columns values from the environment and/or terminfo entry */
 {
+    TERMINAL *termp = cur_term;
     int my_tabsize;
 
     /* figure out the size of the screen */
@@ -297,6 +304,7 @@ _nc_get_screensize(SCREEN *sp, int *linep, int *colp)
 NCURSES_EXPORT(void)
 _nc_update_screensize(SCREEN *sp)
 {
+    TERMINAL *termp = cur_term;
     int old_lines = lines;
     int new_lines;
     int old_cols = columns;
@@ -453,7 +461,7 @@ _nc_unicode_locale(void)
  * character set.
  */
 NCURSES_EXPORT(int)
-_nc_locale_breaks_acs(void)
+_nc_locale_breaks_acs(TERMINAL * termp)
 {
     char *env;
 
@@ -483,7 +491,7 @@ _nc_locale_breaks_acs(void)
 NCURSES_EXPORT(int)
 _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
 {
-    TERMINAL *term_ptr;
+    TERMINAL *termp;
     int status;
 
     START_TRACE();
@@ -528,22 +536,22 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
      * properly with this feature).
      */
     if (reuse
-       && (term_ptr = cur_term) != 0
-       && term_ptr->Filedes == Filedes
-       && term_ptr->_termname != 0
-       && !strcmp(term_ptr->_termname, tname)
-       && _nc_name_match(term_ptr->type.term_names, tname, "|")) {
+       && (termp = cur_term) != 0
+       && termp->Filedes == Filedes
+       && termp->_termname != 0
+       && !strcmp(termp->_termname, tname)
+       && _nc_name_match(termp->type.term_names, tname, "|")) {
        T(("reusing existing terminal information and mode-settings"));
     } else {
 
-       term_ptr = typeCalloc(TERMINAL, 1);
+       termp = typeCalloc(TERMINAL, 1);
 
-       if (term_ptr == 0) {
+       if (termp == 0) {
            ret_error0(TGETENT_ERR,
                       "Not enough memory to create terminal structure.\n");
        }
 #if USE_DATABASE || USE_TERMCAP
-       status = grab_entry(tname, &term_ptr->type);
+       status = grab_entry(tname, &termp->type);
 #else
        status = TGETENT_NO;
 #endif
@@ -553,13 +561,13 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
            const TERMTYPE *fallback = _nc_fallback(tname);
 
            if (fallback) {
-               term_ptr->type = *fallback;
+               termp->type = *fallback;
                status = TGETENT_YES;
            }
        }
 
        if (status != TGETENT_YES) {
-           del_curterm(term_ptr);
+           del_curterm(termp);
            if (status == TGETENT_ERR) {
                ret_error0(status, "terminals database is inaccessible\n");
            } else if (status == TGETENT_NO) {
@@ -567,17 +575,17 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
            }
        }
 #if !USE_REENTRANT
-       strncpy(ttytype, term_ptr->type.term_names, NAMESIZE - 1);
+       strncpy(ttytype, termp->type.term_names, NAMESIZE - 1);
        ttytype[NAMESIZE - 1] = '\0';
 #endif
 
-       term_ptr->Filedes = Filedes;
-       term_ptr->_termname = strdup(tname);
+       termp->Filedes = Filedes;
+       termp->_termname = strdup(tname);
 
-       set_curterm(term_ptr);
+       set_curterm(termp);
 
        if (command_character && getenv("CC"))
-           do_prototype(term_ptr);
+           do_prototype(termp);
 
        /*
         * If an application calls setupterm() rather than initscr() or
index ff97eea920f82b0be955a429302474d9e0b3f866..0d1a5ec23dbadfaa9a524eca5de12c2d63cc7274 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -45,7 +45,7 @@
 
 #include <term_entry.h>
 
-MODULE_ID("$Id: lib_termcap.c,v 1.61 2007/06/02 19:36:03 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.62 2008/06/28 13:33:08 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -164,6 +164,7 @@ tgetent(char *bufp, const char *name)
        LAST_BUF = bufp;
        LAST_USE = TRUE;
 
+       SetNoPadding(SP);
        (void) baudrate();      /* sets ospeed as a side-effect */
 
 /* LINT_PREPRO
index aab3351905cef871bae6dba24bda48f1c1c1dae6..a8b7276895a503a9e3bb2037bdc5e2eeef88836d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,6 +29,7 @@
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
+ *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
 /*
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.66 2008/06/28 13:12:15 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
 
 NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;   /* used by 'tack' program */
 
+#if NCURSES_NO_PADDING
+NCURSES_EXPORT(void)
+_nc_set_no_padding(SCREEN *sp)
+{
+    bool no_padding = (getenv("NCURSES_NO_PADDING") != 0);
+
+    if (sp)
+       sp->_no_padding = no_padding;
+    else
+       _nc_prescreen._no_padding = no_padding;
+
+    TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used",
+                                   GetNoPadding(sp) ? " not" : ""));
+}
+#endif
+
 static int (*my_outch) (int c) = _nc_outch;
 
 NCURSES_EXPORT(int)
@@ -147,7 +164,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
            !xon_xoff
            && padding_baud_rate
 #if NCURSES_NO_PADDING
-           && (SP == 0 || !(SP->_no_padding))
+           && !GetNoPadding(SP)
 #endif
            && (_nc_baudrate(ospeed) >= padding_baud_rate);
     }
index 9846dc1d7bc74c8c7303d1e84348edac606952bc..990f11ce85319becb379596d31a18af6a7f708a5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_tracechr.c,v 1.17 2008/05/31 19:57:47 tom Exp $")
+MODULE_ID("$Id: lib_tracechr.c,v 1.18 2008/06/28 15:52:05 tom Exp $")
 
 #ifdef TRACE
 
index 891b6487acc9632cf50ed444cb0befe60d726804..530de327e4e8d5baba4a2dbfe586202ca1eb59b9 100644 (file)
 #include <term.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_mvcur.c,v 1.111 2008/05/24 14:36:54 Miroslav.Lichvar Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.112 2008/06/28 12:50:46 tom Exp $")
 
 #define WANT_CHAR(y, x)        SP->_newscr->_line[y].text[x]   /* desired state */
 #define BAUDRATE       cur_term->_baudrate     /* bits per second */
@@ -230,7 +230,7 @@ _nc_msec_cost(const char *const cap, int affcnt)
                }
 
 #if NCURSES_NO_PADDING
-               if (!(SP->_no_padding))
+               if (!GetNoPadding(SP))
 #endif
                    cum_cost += number * 10;
            } else
index e221812c3cd005caa624459d32fdf9e61864bd41..97ce54fd65eae39a15c333d7b7a8be3d4ab56edb 100644 (file)
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.               --
+-- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.               --
 --                                                                           --
 -- Permission is hereby granted, free of charge, to any person obtaining a   --
 -- copy of this software and associated documentation files (the             --
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README,v 1.36 2008/04/05 16:24:14 tom Exp $
+-- $Id: README,v 1.37 2008/06/28 15:52:45 tom Exp $
 -------------------------------------------------------------------------------
 
 The programs in this directory are designed to test your newest toy :-)