]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20091031
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Nov 2009 01:07:09 +0000 (01:07 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Nov 2009 01:07:09 +0000 (01:07 +0000)
+ modify use of $CC environment variable which is defined by X/Open
  as a curses feature, to ignore it if it is not a single character
  (prompted by discussion with Benjamin C W Sittler).
+ add START_TRACE in slk_init
+ fix a regression in _nc_ripoffline which made test/ncurses.c not show
  soft-keys, broken in 20090927 merging.
+ change initialization of "hidden" flag for soft-keys from true to
  false, broken in 20090704 merging (Ubuntu #464274).
+ update nsterm entries (patch by Benjamin C W Sittler, prompted by
  discussion with Fabian Groffen in GenToo #206201).
+ add test/xterm-256color.dat

13 files changed:
MANIFEST
NEWS
dist.mk
man/ncurses.3x
misc/terminfo.src
ncurses/base/lib_set_term.c
ncurses/base/lib_slk.c
ncurses/base/lib_slkinit.c
ncurses/curses.priv.h
ncurses/tinfo/lib_setup.c
ncurses/tinfo/tinfo_driver.c
test/xterm-256color.dat [new file with mode: 0644]
test/xterm-88color.dat

index eae005ae367c8000f39b03fc3b649c92e46bf0f6..7004facb41fd833297d129a0e0d3185157bb5b2c 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./test/worm.c
 ./test/xmas.c
 ./test/xterm-16color.dat
 ./test/worm.c
 ./test/xmas.c
 ./test/xterm-16color.dat
+./test/xterm-256color.dat
 ./test/xterm-88color.dat
 ./test/xterm-88color.dat
diff --git a/NEWS b/NEWS
index b807da1457140f76b3d6499b1535b36f426978b9..5170eadd04f0b940ac862b5dd8c1dae7707b6ca0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1452 2009/10/24 20:34:42 tom Exp $
+-- $Id: NEWS,v 1.1456 2009/10/31 20:50:24 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,19 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20091031
+       + modify use of $CC environment variable which is defined by X/Open
+         as a curses feature, to ignore it if it is not a single character
+         (prompted by discussion with Benjamin C W Sittler).
+       + add START_TRACE in slk_init
+       + fix a regression in _nc_ripoffline which made test/ncurses.c not show
+         soft-keys, broken in 20090927 merging.
+       + change initialization of "hidden" flag for soft-keys from true to
+         false, broken in 20090704 merging (Ubuntu #464274).
+       + update nsterm entries (patch by Benjamin C W Sittler, prompted by
+         discussion with Fabian Groffen in GenToo #206201).
+       + add test/xterm-256color.dat
+
 20091024
        + quiet some pedantic gcc warnings.
        + modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
 20091024
        + quiet some pedantic gcc warnings.
        + modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
diff --git a/dist.mk b/dist.mk
index 9352670e6702144df053cf9b706043a74ddc1629..5799cedfcea8a89218a465db8556584a0faf6a82 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.727 2009/10/24 17:18:03 tom Exp $
+# $Id: dist.mk,v 1.728 2009/10/30 22:47:52 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 7
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 7
-NCURSES_PATCH = 20091024
+NCURSES_PATCH = 20091031
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 703a239abfdeff19543fceec8485053326dbffa2..4bc28c15df717ebf33e96373e4a0380730b7efef 100644 (file)
@@ -1,6 +1,6 @@
 '\" t
 .\"***************************************************************************
 '\" t
 .\"***************************************************************************
-.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.92 2008/10/25 23:31:45 tom Exp $
+.\" $Id: ncurses.3x,v 1.93 2009/10/31 20:45:09 tom Exp $
 .hy 0
 .TH ncurses 3X ""
 .ds n 5
 .hy 0
 .TH ncurses 3X ""
 .ds n 5
@@ -756,6 +756,10 @@ When set, change occurrences of the command_character
 (i.e., the \fBcmdch\fP capability)
 of the loaded terminfo entries to the value of this symbol.
 Very few terminfo entries provide this feature.
 (i.e., the \fBcmdch\fP capability)
 of the loaded terminfo entries to the value of this symbol.
 Very few terminfo entries provide this feature.
+.IP
+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
 COLUMNS
 Specify the width of the screen in characters.
 .TP 5
 COLUMNS
 Specify the width of the screen in characters.
index 5d7d1061f9f47e8d98d52b69beb808b32697882e..e11172b3c486d9fdcbd1fac8db8f68218d34815b 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.353 $
-#      $Date: 2009/10/03 18:57:06 $
+#      $Revision: 1.354 $
+#      $Date: 2009/10/31 17:28:35 $
 #
 # 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
 #
 # 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
@@ -16704,7 +16704,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
 #     export TERM
 #     if [ :"$TERM_PROGRAM_VERSION" = :41 ]
 #     then
 #     export TERM
 #     if [ :"$TERM_PROGRAM_VERSION" = :41 ]
 #     then
-#         TERM="nsterm"
+#         TERM="nsterm-old"
 #     else
 #         TERM="nsterm-c-7"
 #     fi
 #     else
 #         TERM="nsterm-c-7"
 #     fi
@@ -16715,7 +16715,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
 # if ( $?TERM && $?TERM_PROGRAM && $?TERM_PROGRAM_VERSION) then
 #     if ( :"$TERM" == :"vt100" && :"$TERM_PROGRAM" == :"Apple_Terminal" ) then
 #          if ( :"$TERM_PROGRAM_VERSION" == :41 ) then
 # if ( $?TERM && $?TERM_PROGRAM && $?TERM_PROGRAM_VERSION) then
 #     if ( :"$TERM" == :"vt100" && :"$TERM_PROGRAM" == :"Apple_Terminal" ) then
 #          if ( :"$TERM_PROGRAM_VERSION" == :41 ) then
-#              setenv TERM "nsterm"
+#              setenv TERM "nsterm-old"
 #          else
 #              setenv TERM "nsterm-c-7"
 #          endif
 #          else
 #              setenv TERM "nsterm-c-7"
 #          endif
@@ -16732,24 +16732,24 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
        home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
        home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
-       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-       kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l,
-       rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
+       invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM,
+       rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        enacs=\E(B\E)0, rmacs=^O,
        sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        smacs=^N, use=nsterm+7,
 
 nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
        acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377,
        enacs=\E(B\E)0, rmacs=^O,
        smacs=^N, use=nsterm+7,
 
 nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
        acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        smacs=^N, use=nsterm+7,
 
 nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support,
        smacs=^N, use=nsterm+7,
 
 nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support,
@@ -16811,7 +16811,7 @@ nsterm-m|AppKit Terminal.app v41+ w/MacRoman charset (monochrome),
 nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline),
        use=nsterm+s, use=nsterm+mac,
 
 nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline),
        use=nsterm+s, use=nsterm+mac,
 
-nsterm|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color),
+nsterm-old|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color),
        use=nsterm+c41, use=nsterm+mac,
 
 nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color),
        use=nsterm+c41, use=nsterm+mac,
 
 nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color),
@@ -16828,12 +16828,42 @@ nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline)
 # and D P Schreber comparing to nsterm-c-s-acs.
 #
 # D P Schreber notes that $TERM can be set in Terminal.app, e.g.,
 # and D P Schreber comparing to nsterm-c-s-acs.
 #
 # D P Schreber notes that $TERM can be set in Terminal.app, e.g.,
-#      defaults write com.apple.Terminal TermCapString nsterm-c-s-acs
+#      defaults write com.apple.Terminal TermCapString nsterm-16color
 # and that it is not set in Terminal's preferences dialog.
 # and that it is not set in Terminal's preferences dialog.
-nsterm-16color|AppKit Terminal.app v100.1.8 with MacOS X 10.3.9,
-       kdch1=\E[3~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
-       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
-       knp=\E[6~, kpp=\E[5~, use=nsterm-c-s-acs,
+nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
+       npc,
+       civis=\E[?25l, cnorm=\E[?25h,
+       flash=\E[?5h$<200/>\E[?5l, kdch1=\E[3~, kend=\E[F,
+       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+       kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
+       kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~,
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H,
+       knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8,
+       smcup=\E7\E[?47h, use=nsterm-c-s-acs,
+
+# The versions of Terminal.app in Mac OS X version 10.3.x seem to have
+# the background color erase bug. The newer version 240.2 in Mac OS X
+# version 10.5 does not.
+nsterm-bce|AppKit Terminal.app v100.1.8+ (bce),
+       bce, use=nsterm-16color,
+
+# This is an alias which should always point to the "current" version
+nsterm|AppKit Terminal.app,
+       use=nsterm-16color,
+
+# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and
+# more featureful) terminal emulator for Mac OS X. It is similar
+# enough in capabilities to nsterm-16color that I have derived this
+# description from that one, but as far as I know they share no code.
+# Many of the features are user-configurable, but I attempt only to
+# describe the default configuration.
+#
+# NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
+# disabled.
+iTerm.app|iTerm.app terminal emulator for Mac OS X,
+       bce, bw@, ccc@,
+       csr@, initc@, kend=\EOF, khome=\EOH, use=xterm+256color,
+       use=nsterm-16color,
 
 # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
 #
 
 # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
 #
@@ -21903,6 +21933,9 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * similar change for dg+ccc and dgunix+ccc (Benjamin Sittler)
 #      * add ccc and initc capabilities to xterm-16color -TD
 #
 #      * similar change for dg+ccc and dgunix+ccc (Benjamin Sittler)
 #      * add ccc and initc capabilities to xterm-16color -TD
 #
+# 2009-10-31
+#      * updated nsterm* entries (Benjamin Sittler, prompted by GenToo #206201)
+#
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"
index 7429e2aa23ad9aa0cf2a16bca13ab944b5ace5ca..9bb46fc7f8b4849cccabf3789b8f5b91cf15c4f1 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_set_term.c,v 1.129 2009/10/24 22:09:47 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.131 2009/10/31 22:28:04 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -282,24 +282,31 @@ extract_fgbg(char *src, int *result)
 NCURSES_EXPORT(SCREEN *)
 new_prescr(void)
 {
 NCURSES_EXPORT(SCREEN *)
 new_prescr(void)
 {
-    SCREEN *sp = _nc_alloc_screen_sp();
-    if (sp) {
-       sp->rsp = sp->rippedoff;
-       sp->_filtered = _nc_prescreen.filter_mode;
-       sp->_use_env = _nc_prescreen.use_env;
+    static SCREEN *sp;
+
+    START_TRACE();
+    T((T_CALLED("new_prescr()")));
+
+    if (sp == 0) {
+       sp = _nc_alloc_screen_sp();
+       if (sp != 0) {
+           sp->rsp = sp->rippedoff;
+           sp->_filtered = _nc_prescreen.filter_mode;
+           sp->_use_env = _nc_prescreen.use_env;
 #if NCURSES_NO_PADDING
 #if NCURSES_NO_PADDING
-       sp->_no_padding = _nc_prescreen._no_padding;
+           sp->_no_padding = _nc_prescreen._no_padding;
 #endif
 #endif
-       sp->slk_format = 0;
-       sp->_slk = 0;
-       sp->_prescreen = TRUE;
-       SP_PRE_INIT(sp);
+           sp->slk_format = 0;
+           sp->_slk = 0;
+           sp->_prescreen = TRUE;
+           SP_PRE_INIT(sp);
 #if USE_REENTRANT
 #if USE_REENTRANT
-       sp->_TABSIZE = _nc_prescreen._TABSIZE;
-       sp->_ESCDELAY = _nc_prescreen._ESCDELAY;
+           sp->_TABSIZE = _nc_prescreen._TABSIZE;
+           sp->_ESCDELAY = _nc_prescreen._ESCDELAY;
 #endif
 #endif
+       }
     }
     }
-    return sp;
+    returnSP(sp);
 }
 #endif
 
 }
 #endif
 
@@ -667,9 +674,11 @@ NCURSES_SP_NAME(_nc_setupscreen) (
               We assume that we must simulate, if it is none of the standard
               formats (4-4 or 3-2-3) for which there may be some hardware
               support. */
               We assume that we must simulate, if it is none of the standard
               formats (4-4 or 3-2-3) for which there may be some hardware
               support. */
-           if (rop->hook == _nc_slk_initialize)
-               if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format)))
+           if (rop->hook == _nc_slk_initialize) {
+               if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) {
                    continue;
                    continue;
+               }
+           }
            if (rop->hook) {
                int count;
                WINDOW *w;
            if (rop->hook) {
                int count;
                WINDOW *w;
@@ -753,7 +762,10 @@ NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
     START_TRACE();
     T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, (void *) init));
 
     START_TRACE();
     T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, (void *) init));
 
-    if (SP_PARM != 0 && SP_PARM->_prescreen) {
+#if NCURSES_SP_FUNCS
+    if (SP_PARM != 0 && SP_PARM->_prescreen)
+#endif
+    {
        if (line == 0) {
            code = OK;
        } else {
        if (line == 0) {
            code = OK;
        } else {
index 9cd3a55cd085f543aaeb9baf3c0447bf54964778..39343d1546c4bc6dc839c53c712a1654002f6f58 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_slk.c,v 1.43 2009/10/24 22:12:21 tom Exp $")
+MODULE_ID("$Id: lib_slk.c,v 1.44 2009/10/31 19:51:40 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
@@ -161,8 +161,6 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
     } else if ((SP_PARM->_slk = typeCalloc(SLK, 1)) == 0)
        returnCode(ERR);
 
     } else if ((SP_PARM->_slk = typeCalloc(SLK, 1)) == 0)
        returnCode(ERR);
 
-    SP_PARM->_slk->hidden = TRUE;
-    SP_PARM->_slk->ent = NULL;
     if (!SP_PARM->slk_format)
        SP_PARM->slk_format = _nc_globals.slk_format;
 
     if (!SP_PARM->slk_format)
        SP_PARM->slk_format = _nc_globals.slk_format;
 
index f856a5744cf5bf13619fe33bc0afd0bce0d4a728..9cbdfea98430b8cec66695699f060b78ed836450 100644 (file)
@@ -40,7 +40,7 @@
  */
 #include <curses.priv.h>
 
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkinit.c,v 1.12 2009/10/24 22:12:21 tom Exp $")
+MODULE_ID("$Id: lib_slkinit.c,v 1.13 2009/10/31 00:10:46 tom Exp $")
 
 #ifdef USE_SP_RIPOFF
 #define SoftkeyFormat SP_PARM->slk_format
 
 #ifdef USE_SP_RIPOFF
 #define SoftkeyFormat SP_PARM->slk_format
@@ -53,6 +53,7 @@ NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
 {
     int code = ERR;
 
 {
     int code = ERR;
 
+    START_TRACE();
     T((T_CALLED("slk_init(%p,%d)"), (void *) SP_PARM, format));
 
     if (format >= 0
     T((T_CALLED("slk_init(%p,%d)"), (void *) SP_PARM, format));
 
     if (format >= 0
index 256c6f98e19fd5a8107a05c6927f336ec00cb5b8..1f5507b2a02a25d926ff237de409ffd5fa016e78 100644 (file)
@@ -35,7 +35,7 @@
 
 
 /*
 
 
 /*
- * $Id: curses.priv.h,v 1.441 2009/10/24 20:29:56 tom Exp $
+ * $Id: curses.priv.h,v 1.442 2009/10/31 20:33:43 tom Exp $
  *
  *     curses.priv.h
  *
  *
  *     curses.priv.h
  *
@@ -1719,6 +1719,7 @@ extern NCURSES_EXPORT(char *) _nc_get_locale(void);
 extern NCURSES_EXPORT(int)    _nc_unicode_locale(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(int)    _nc_unicode_locale(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_tinfo_cmdch(TERMINAL *, char);
 
 /* lib_set_term.c */
 extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
 
 /* lib_set_term.c */
 extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
index 891a1012c0180a9ac141df6122185904eba23c58..d00ecb0ab567dcc2aef0c022e9e3a1354e7dae85 100644 (file)
@@ -52,7 +52,7 @@
 #include <locale.h>
 #endif
 
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.120 2009/10/24 21:56:15 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.123 2009/10/31 20:39:36 tom Exp $")
 
 /****************************************************************************
  *
 
 /****************************************************************************
  *
@@ -465,35 +465,34 @@ grab_entry(const char *const tn, TERMTYPE *const tp)
     return (status);
 }
 #endif
     return (status);
 }
 #endif
+#endif /* !USE_TERM_DRIVER */
 
 /*
 
 /*
-**     do_prototype()
-**
 **     Take the real command character out of the CC environment variable
 **     and substitute it in for the prototype given in 'command_character'.
 */
 **     Take the real command character out of the CC environment variable
 **     and substitute it in for the prototype given in 'command_character'.
 */
-static void
-do_prototype(TERMINAL * termp)
+void
+_nc_tinfo_cmdch(TERMINAL * termp, char proto)
 {
     unsigned i;
     char CC;
 {
     unsigned i;
     char CC;
-    char proto;
     char *tmp;
 
     char *tmp;
 
-    if ((tmp = getenv("CC")) != 0) {
-       if ((CC = *tmp) != 0) {
-           proto = *command_character;
-
-           for_each_string(i, &(termp->type)) {
-               for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
-                   if (*tmp == proto)
-                       *tmp = CC;
-               }
+    /*
+     * Only use the character if the string is a single character,
+     * since it is fairly common for developers to set the C compiler
+     * name as an environment variable - using the same symbol.
+     */
+    if ((tmp = getenv("CC")) != 0 && strlen(tmp) == 1) {
+       CC = *tmp;
+       for_each_string(i, &(termp->type)) {
+           for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
+               if (*tmp == proto)
+                   *tmp = CC;
            }
        }
     }
 }
            }
        }
     }
 }
-#endif /* !USE_TERM_DRIVER */
 
 /*
  * Find the locale which is in effect.
 
 /*
  * Find the locale which is in effect.
@@ -706,8 +705,8 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
 
        set_curterm(termp);
 
 
        set_curterm(termp);
 
-       if (command_character && getenv("CC"))
-           do_prototype(termp);
+       if (command_character)
+           _nc_tinfo_cmdch(termp, *command_character);
 
        /*
         * If an application calls setupterm() rather than initscr() or
 
        /*
         * If an application calls setupterm() rather than initscr() or
index c824d4340298509edb4b91461762ac031ab36812..22c31594901b2baeb5a974fe72e282626a3fb095 100644 (file)
@@ -50,7 +50,7 @@
 # endif
 #endif
 
 # endif
 #endif
 
-MODULE_ID("$Id: tinfo_driver.c,v 1.3 2009/09/27 17:29:39 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.5 2009/10/31 20:32:01 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -184,35 +184,6 @@ drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
     return TINFO_DOUPDATE(TCB->csp);
 }
 
     return TINFO_DOUPDATE(TCB->csp);
 }
 
-/*
-**     do_prototype()
-**
-**     Take the real command character out of the CC environment variable
-**     and substitute it in for the prototype given in 'command_character'.
-*/
-static void
-do_prototype(TERMINAL * termp)
-{
-    unsigned i;
-    char CC;
-    char proto;
-    char *tmp;
-    TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
-
-    if ((tmp = getenv("CC")) != 0) {
-       if ((CC = *tmp) != 0) {
-           proto = *command_character;
-
-           for_each_string(i, &(termp->type)) {
-               for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
-                   if (*tmp == proto)
-                       *tmp = CC;
-               }
-           }
-       }
-    }
-}
-
 #define ret_error(code, fmt, arg)      if (errret) {\
                                            *errret = code;\
                                            return(FALSE); \
 #define ret_error(code, fmt, arg)      if (errret) {\
                                            *errret = code;\
                                            return(FALSE); \
@@ -304,8 +275,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
     ttytype[NAMESIZE - 1] = '\0';
 #endif
 
     ttytype[NAMESIZE - 1] = '\0';
 #endif
 
-    if (command_character && getenv("CC"))
-       do_prototype(termp);
+    if (command_character)
+       _nc_tinfo_cmdch(termp, *command_character);
 
     if (generic_type) {
        ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
 
     if (generic_type) {
        ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
diff --git a/test/xterm-256color.dat b/test/xterm-256color.dat
new file mode 100644 (file)
index 0000000..3dcaabd
--- /dev/null
@@ -0,0 +1,293 @@
+##############################################################################
+# Copyright (c) 2009 Free Software Foundation, Inc.                          #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+# $Id: xterm-256color.dat,v 1.1 2009/10/30 22:33:40 tom Exp $
+# This illustrates the predefined colors for xterm's "xterm-256color" feature.
+# If you set $TERM to "xterm-256color" (and have xterm compiled to support the
+# 256-color feature), you can use the ncurses 'd' screen to
+# manipulate the colors shown in the screen.  The 'd' screen is limited to
+# the first 16 colors, and xterm happens to use the same first 16 colors in
+# the extended color models that support initc.
+#
+# The colors shown are for xterm patch #189.
+scale:255
+0:       0   0   0             black
+1:     205   0   0             red3
+2:       0 205   0             green3
+3:     205 205   0             yellow3
+4:      30 144 255             DodgerBlue1
+5:     205   0 205             magenta3
+6:       0 205 205             cyan3
+7:     229 229 229             gray90
+8:     127 127 127             gray50
+9:     255   0   0             red
+10:      0 255   0             green
+11:    255 255   0             yellow
+12:     99 184 255             SteelBlue1
+13:    255   0 255             magenta
+14:      0 255 255             cyan
+15:    255 255 255             white
+16:      0   0   0
+17:      0   0  95
+18:      0   0 135
+19:      0   0 175
+20:      0   0 215
+21:      0   0 255
+22:      0  95   0
+23:      0  95  95
+24:      0  95 135
+25:      0  95 175
+26:      0  95 215
+27:      0  95 255
+28:      0 135   0
+29:      0 135  95
+30:      0 135 135
+31:      0 135 175
+32:      0 135 215
+33:      0 135 255
+34:      0 175   0
+35:      0 175  95
+36:      0 175 135
+37:      0 175 175
+38:      0 175 215
+39:      0 175 255
+40:      0 215   0
+41:      0 215  95
+42:      0 215 135
+43:      0 215 175
+44:      0 215 215
+45:      0 215 255
+46:      0 255   0
+47:      0 255  95
+48:      0 255 135
+49:      0 255 175
+50:      0 255 215
+51:      0 255 255
+52:     95   0   0
+53:     95   0  95
+54:     95   0 135
+55:     95   0 175
+56:     95   0 215
+57:     95   0 255
+58:     95  95   0
+59:     95  95  95
+60:     95  95 135
+61:     95  95 175
+62:     95  95 215
+63:     95  95 255
+64:     95 135   0
+65:     95 135  95
+66:     95 135 135
+67:     95 135 175
+68:     95 135 215
+69:     95 135 255
+70:     95 175   0
+71:     95 175  95
+72:     95 175 135
+73:     95 175 175
+74:     95 175 215
+75:     95 175 255
+76:     95 215   0
+77:     95 215  95
+78:     95 215 135
+79:     95 215 175
+80:     95 215 215
+81:     95 215 255
+82:     95 255   0
+83:     95 255  95
+84:     95 255 135
+85:     95 255 175
+86:     95 255 215
+87:     95 255 255
+88:    135   0   0
+89:    135   0  95
+90:    135   0 135
+91:    135   0 175
+92:    135   0 215
+93:    135   0 255
+94:    135  95   0
+95:    135  95  95
+96:    135  95 135
+97:    135  95 175
+98:    135  95 215
+99:    135  95 255
+100:   135 135   0
+101:   135 135  95
+102:   135 135 135
+103:   135 135 175
+104:   135 135 215
+105:   135 135 255
+106:   135 175   0
+107:   135 175  95
+108:   135 175 135
+109:   135 175 175
+110:   135 175 215
+111:   135 175 255
+112:   135 215   0
+113:   135 215  95
+114:   135 215 135
+115:   135 215 175
+116:   135 215 215
+117:   135 215 255
+118:   135 255   0
+119:   135 255  95
+120:   135 255 135
+121:   135 255 175
+122:   135 255 215
+123:   135 255 255
+124:   175   0   0
+125:   175   0  95
+126:   175   0 135
+127:   175   0 175
+128:   175   0 215
+129:   175   0 255
+130:   175  95   0
+131:   175  95  95
+132:   175  95 135
+133:   175  95 175
+134:   175  95 215
+135:   175  95 255
+136:   175 135   0
+137:   175 135  95
+138:   175 135 135
+139:   175 135 175
+140:   175 135 215
+141:   175 135 255
+142:   175 175   0
+143:   175 175  95
+144:   175 175 135
+145:   175 175 175
+146:   175 175 215
+147:   175 175 255
+148:   175 215   0
+149:   175 215  95
+150:   175 215 135
+151:   175 215 175
+152:   175 215 215
+153:   175 215 255
+154:   175 255   0
+155:   175 255  95
+156:   175 255 135
+157:   175 255 175
+158:   175 255 215
+159:   175 255 255
+160:   215   0   0
+161:   215   0  95
+162:   215   0 135
+163:   215   0 175
+164:   215   0 215
+165:   215   0 255
+166:   215  95   0
+167:   215  95  95
+168:   215  95 135
+169:   215  95 175
+170:   215  95 215
+171:   215  95 255
+172:   215 135   0
+173:   215 135  95
+174:   215 135 135
+175:   215 135 175
+176:   215 135 215
+177:   215 135 255
+178:   215 175   0
+179:   215 175  95
+180:   215 175 135
+181:   215 175 175
+182:   215 175 215
+183:   215 175 255
+184:   215 215   0
+185:   215 215  95
+186:   215 215 135
+187:   215 215 175
+188:   215 215 215
+189:   215 215 255
+190:   215 255   0
+191:   215 255  95
+192:   215 255 135
+193:   215 255 175
+194:   215 255 215
+195:   215 255 255
+196:   255   0   0
+197:   255   0  95
+198:   255   0 135
+199:   255   0 175
+200:   255   0 215
+201:   255   0 255
+202:   255  95   0
+203:   255  95  95
+204:   255  95 135
+205:   255  95 175
+206:   255  95 215
+207:   255  95 255
+208:   255 135   0
+209:   255 135  95
+210:   255 135 135
+211:   255 135 175
+212:   255 135 215
+213:   255 135 255
+214:   255 175   0
+215:   255 175  95
+216:   255 175 135
+217:   255 175 175
+218:   255 175 215
+219:   255 175 255
+220:   255 215   0
+221:   255 215  95
+222:   255 215 135
+223:   255 215 175
+224:   255 215 215
+225:   255 215 255
+226:   255 255   0
+227:   255 255  95
+228:   255 255 135
+229:   255 255 175
+230:   255 255 215
+231:   255 255 255
+232:     8   8   8
+233:    18  18  18
+234:    28  28  28
+235:    38  38  38
+236:    48  48  48
+237:    58  58  58
+238:    68  68  68
+239:    78  78  78
+240:    88  88  88
+241:    98  98  98
+242:   108 108 108
+243:   118 118 118
+244:   128 128 128
+245:   138 138 138
+246:   148 148 148
+247:   158 158 158
+248:   168 168 168
+249:   178 178 178
+250:   188 188 188
+251:   198 198 198
+252:   208 208 208
+253:   218 218 218
+254:   228 228 228
+255:   238 238 238
index cd8aa1c861d38a0ff5929189509be6e43391bc21..95a753cdcec29f5c15680e0bb37e6b52c02f60d2 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
 ##############################################################################
-# Copyright (c) 2005,2006 Free Software Foundation, Inc.                     #
+# Copyright (c) 2005-2006,2009 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"), #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -25,8 +25,8 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: xterm-88color.dat,v 1.2 2006/04/22 21:40:00 tom Exp $
-# This illustrates the predefined colors for XFree86 xterm's "xterm-16color". 
+# $Id: xterm-88color.dat,v 1.3 2009/10/30 22:33:56 tom Exp $
+# This illustrates the predefined colors for xterm's "xterm-88color" feature.
 # If you set $TERM to "xterm-88color" (and have xterm compiled to support the
 # 88-color or 256-color feature), you can use the ncurses 'd' screen to
 # manipulate the colors shown in the screen.  The 'd' screen is limited to
 # If you set $TERM to "xterm-88color" (and have xterm compiled to support the
 # 88-color or 256-color feature), you can use the ncurses 'd' screen to
 # manipulate the colors shown in the screen.  The 'd' screen is limited to