]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20090221
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 Feb 2009 02:08:00 +0000 (02:08 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 Feb 2009 02:08:00 +0000 (02:08 +0000)
+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).

36 files changed:
NEWS
dist.mk
include/capdefaults.c
include/curses.h.in
ncurses/base/MKlib_gen.sh
ncurses/base/key_defined.c
ncurses/base/keybound.c
ncurses/base/legacy_coding.c
ncurses/base/lib_echo.c
ncurses/base/lib_nl.c
ncurses/base/lib_slkatr_set.c
ncurses/base/lib_slkatrof.c
ncurses/base/lib_slkatron.c
ncurses/base/lib_slkatrset.c
ncurses/base/lib_slkattr.c
ncurses/base/lib_slkclear.c
ncurses/base/lib_slkcolor.c
ncurses/base/lib_slklab.c
ncurses/base/lib_slkset.c
ncurses/base/lib_slktouch.c
ncurses/base/lib_winch.c
ncurses/base/tries.c
ncurses/curses.priv.h
ncurses/tinfo/MKnames.awk
ncurses/tinfo/lib_termname.c
ncurses/tinfo/lib_tparm.c
ncurses/tinfo/make_keys.c
ncurses/tinfo/name_match.c
ncurses/tinfo/use_screen.c
ncurses/trace/lib_tracebits.c
ncurses/trace/lib_tracemse.c
ncurses/trace/varargs.c
ncurses/tty/lib_vidattr.c
ncurses/widechar/lib_cchar.c
ncurses/widechar/lib_get_wstr.c
ncurses/widechar/lib_wacs.c

diff --git a/NEWS b/NEWS
index f35276ff063c748c60837118d478643ebce1ef95..2830d23cab9022f3bbfde4005e4e65a5eb6544d3 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.1364 2009/02/15 00:20:00 tom Exp $
+-- $Id: NEWS,v 1.1365 2009/02/22 02:05:30 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,9 @@ 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.
 
+20090221
+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
 20090214
        + add configure script --enable-sp-funcs to enable the new set of
          extended functions.
diff --git a/dist.mk b/dist.mk
index 13e1f2967c5d273c0c0e294e45b2dd98cd2aa289..fe733c52d2706d52657d84453d7ead63098a1203 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.686 2009/02/14 21:09:27 tom Exp $
+# $Id: dist.mk,v 1.687 2009/02/21 21:20:20 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 = 7
-NCURSES_PATCH = 20090214
+NCURSES_PATCH = 20090221
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 33f2fe8f029909a71105646fa442b822e74d4937..da76cc1d7a57d8d7fad3679cd70c21e31888f710 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: capdefaults.c,v 1.13 2008/08/04 12:33:42 tom Exp $ */
+/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */
 
     /*
      * Compute obsolete capabilities.  The reason this is an include file is
      * postprocess_termcap().
      */
 {
-    char *sp;
+    char *strp;
     short capval;
 
 #define EXTRACT_DELAY(str) \
-       (short) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0)
+       (short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0)
 
     /* current (4.4BSD) capabilities marked obsolete */
     if (VALID_STRING(carriage_return)
index 79bd623f20ecbda3a7405093d47005e3c49a04f0..5baab3ea53dd5b475e058b72e5acb392dfdaf8da 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.193 2009/02/15 00:04:23 tom Exp $ */
+/* $Id: curses.h.in,v 1.194 2009/02/21 22:44:41 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -929,6 +929,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented */
index a984e8545effaaa701a7cabae42217a8a935b2e1..3171ed3fa8a5eedc485185c7ae4825f70eb47f58 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.34 2008/08/30 19:20:50 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.35 2008/11/16 00:19:59 juergen Exp $)
 #
 ##############################################################################
 # Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
@@ -199,7 +199,7 @@ $0 !~ /^P_/ {
        }
        second = first + 1;
        if ( $first == "chtype" ) {
-               returnType = "Char";
+               returnType = "Chtype";
        } else if ( $first == "SCREEN" ) {
                returnType = "SP";
        } else if ( $first == "WINDOW" ) {
index 20fd92170b1e299988ad44000ad8bf7de41e25bd..f8f2346614bf7ee8d5680825e00a0d9859bf8146 100644 (file)
  ****************************************************************************/
 
 /****************************************************************************
- *  Author: Thomas E. Dickey                        2003                    *
- *     and: Juergen Pfeifer                         2009                    *
+ *  Author: Thomas E. Dickey, 2003                                          *
  ****************************************************************************/
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: key_defined.c,v 1.7 2009/02/15 00:30:00 tom Exp $")
+MODULE_ID("$Id: key_defined.c,v 1.8 2009/02/21 16:24:26 tom Exp $")
 
 static int
 find_definition(TRIES * tree, const char *str)
@@ -70,7 +69,7 @@ NCURSES_SP_NAME(key_defined) (NCURSES_SP_DCLx const char *str)
 {
     int code = ERR;
 
-    T((T_CALLED("key_defined(%s)"), _nc_visbuf(str)));
+    T((T_CALLED("key_defined(%p, %s)"), SP_PARM, _nc_visbuf(str)));
     if (SP_PARM != 0 && str != 0) {
        code = find_definition(SP_PARM->_keytry, str);
     }
index 279e0a574b1e15eb18f95489fd1e91f7c63419b2..70936359b44f6250a674da2ff26b3fa979e334d2 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: keybound.c,v 1.8 2009/02/15 00:31:10 tom Exp $")
+MODULE_ID("$Id: keybound.c,v 1.9 2009/02/21 16:32:34 tom Exp $")
 
 /*
  * Returns the count'th string definition which is associated with the
@@ -44,7 +44,7 @@ NCURSES_SP_NAME(keybound) (NCURSES_SP_DCLx int code, int count)
 {
     char *result = 0;
 
-    T((T_CALLED("keybound(%d,%d)"), code, count));
+    T((T_CALLED("keybound(%p, %d,%d)"), SP_PARM, code, count));
     if (SP_PARM != 0 && code >= 0) {
        result = _nc_expand_try(SP_PARM->_keytry, (unsigned) code, &count, 0);
     }
index 76654302000c0f1fb4ac02d91a588b63f4f29cd5..b347cea7d06f22ccef1abced130bc59f83967ce5 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: legacy_coding.c,v 1.3 2009/02/14 21:46:14 tom Exp $")
+MODULE_ID("$Id: legacy_coding.c,v 1.4 2009/02/21 16:16:38 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(use_legacy_coding) (NCURSES_SP_DCLx int level)
 {
     int result = ERR;
 
-    T((T_CALLED("use_legacy_coding(%d)"), level));
+    T((T_CALLED("use_legacy_coding(%p,%d)"), SP_PARM, level));
     if (level >= 0 && level <= 2 && SP_PARM != 0) {
        result = SP_PARM->_legacy_coding;
        SP_PARM->_legacy_coding = level;
index 4f10f482ec8c6b62de5a42e96ec172a6e6fb19b6..c2cdfc9b2a1c13576b059019a850cbf1daf83ba0 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000,2009 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            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_echo.c,v 1.6 2009/02/15 00:34:19 tom Exp $")
+MODULE_ID("$Id: lib_echo.c,v 1.7 2009/02/21 20:20:40 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("echo()")));
+    T((T_CALLED("echo(%p)"), SP_PARM));
+    if (0 == SP_PARM)
+       returnCode(ERR);
     SP_PARM->_echo = TRUE;
     returnCode(OK);
 }
@@ -65,7 +67,9 @@ echo(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(noecho) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("noecho()")));
+    T((T_CALLED("noecho(%p)"), SP_PARM));
+    if (0 == SP_PARM)
+       returnCode(ERR);
     SP_PARM->_echo = FALSE;
     returnCode(OK);
 }
index c3a830bdc037dc8b9e06f4d2ede63afb67bd5847..9a05ab8bc73583f025c0ef9c3c25921adb1f0bb3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000,2009 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            *
@@ -44,7 +44,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_nl.c,v 1.9 2009/02/15 00:38:22 tom Exp $")
+MODULE_ID("$Id: lib_nl.c,v 1.10 2009/02/21 20:58:21 tom Exp $")
 
 #ifdef __EMX__
 #include <io.h>
@@ -53,15 +53,14 @@ MODULE_ID("$Id: lib_nl.c,v 1.9 2009/02/15 00:38:22 tom Exp $")
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(nl) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("nl()")));
-
+    T((T_CALLED("nl(%p)"), SP_PARM));
+    if (0 == SP_PARM)
+       returnCode(ERR);
     SP_PARM->_nl = TRUE;
-
 #ifdef __EMX__
     _nc_flush();
     _fsetmode(NC_OUTPUT, "t");
 #endif
-
     returnCode(OK);
 }
 
@@ -76,15 +75,14 @@ nl(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("nonl()")));
-
+    T((T_CALLED("nonl(%p)"), SP_PARM));
+    if (0 == SP_PARM)
+       returnCode(ERR);
     SP_PARM->_nl = FALSE;
-
 #ifdef __EMX__
     _nc_flush();
     _fsetmode(NC_OUTPUT, "b");
 #endif
-
     returnCode(OK);
 }
 
index 7fba7ac33e6c5c967b41b30931425156088d072f..f9ac4951128fab26f38516fef54024a35d99c107 100644 (file)
@@ -38,7 +38,7 @@
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatr_set.c,v 1.12 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.13 2009/02/21 17:20:17 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
@@ -48,7 +48,7 @@ NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
 {
     int code = ERR;
 
-    T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
+    T((T_CALLED("slk_attr_set(%p,%s,%d)"), SP_PARM, _traceattr(attr), color_pair_number));
 
     if (SP_PARM != 0
        && SP_PARM->_slk != 0
index afbc62a8db091c23fbd12af21a2c688b74acc191..274f963f42d83d7f1924af7bee0bee9a840bb427 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatrof.c,v 1.9 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkatrof.c,v 1.10 2009/02/21 17:35:28 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attroff) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attroff(%s)"), _traceattr(attr)));
+    T((T_CALLED("slk_attroff(%p,%s)"), SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
index a3be55f2f130fcb417fe3899384f02a2fc6af1f6..4734ce5ff255195641f93191901d01e748e8670b 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatron.c,v 1.9 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkatron.c,v 1.10 2009/02/21 18:16:04 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attron) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attron(%s)"), _traceattr(attr)));
+    T((T_CALLED("slk_attron(%p,%s)"), SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
index 3a3110f721c2d21ba024468d70c44578591a6d22..e33747e7bdb4466e60e8f9e0f4571e9a09f37ae8 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatrset.c,v 1.8 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkatrset.c,v 1.9 2009/02/21 17:49:07 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attrset) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attrset(%s)"), _traceattr(attr)));
+    T((T_CALLED("slk_attrset(%p,%s)"), SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        SetAttr(SP_PARM->_slk->attr, attr);
index 0600f37c9e9b43278c592bf35b51b65f619ae17d..2e254da4a36ec11be06e2fdbc22680c767fb58a4 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkattr.c,v 1.7 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkattr.c,v 1.8 2009/02/21 17:48:14 tom Exp $")
 
 NCURSES_EXPORT(attr_t)
 NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_attr()")));
+    T((T_CALLED("slk_attr(%p)"), SP_PARM));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        attr_t result = AttrOf(SP_PARM->_slk->attr) & ALL_BUT_COLOR;
index 991315cd46a9d4a186ee650889dbc8494d869698..54d5781618f4ad00e86c5334e571c9d81b604833 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkclear.c,v 1.11 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkclear.c,v 1.12 2009/02/21 17:47:14 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_clear) (NCURSES_SP_DCL0)
 {
     int rc = ERR;
 
-    T((T_CALLED("slk_clear()")));
+    T((T_CALLED("slk_clear(%p)"), SP_PARM));
 
-    if (SP_PARM != NULL && SP_PARM->_slk != NULL) {
+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        SP_PARM->_slk->hidden = TRUE;
        /* For simulated SLK's it looks much more natural to
           inherit those attributes from the standard screen */
-       SP_PARM->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
-       WINDOW_ATTRS(SP_PARM->_slk->win) = WINDOW_ATTRS(stdscr);
-       if (SP_PARM->_slk->win == stdscr) {
+       SP_PARM->_slk->win->_nc_bkgd = SP_PARM->_stdscr->_nc_bkgd;
+       WINDOW_ATTRS(SP_PARM->_slk->win) = WINDOW_ATTRS(SP_PARM->_stdscr);
+       if (SP_PARM->_slk->win == SP_PARM->_stdscr) {
            rc = OK;
        } else {
            werase(SP_PARM->_slk->win);
index 6681c5b05f8bac2479083aad81cb614e2fbef5e0..17550bd13c81e2e221ae0388d1453982b21d8ea5 100644 (file)
@@ -27,7 +27,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- *  Author:  Juergen Pfeifer, 1998                                          *
+ *  Author:  Juergen Pfeifer, 1998,2009                                     *
  *     and:  Thomas E. Dickey 2005-on                                       *
  ****************************************************************************/
 
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkcolor.c,v 1.14 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkcolor.c,v 1.15 2009/02/21 16:59:50 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
 {
     int code = ERR;
 
-    T((T_CALLED("slk_color(%d)"), color_pair_number));
+    T((T_CALLED("slk_color(%p,%d)"), SP_PARM, color_pair_number));
 
     if (SP_PARM != 0
        && SP_PARM->_slk != 0
index eba3896941d3a89dc472ac61de0aac744ef4b6af..85bb8cbdce44ae14b33850d9d81fa7872661af55 100644 (file)
@@ -29,8 +29,8 @@
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
- *     and: Thomas E. Dickey                        1996-on                 *
- *     and: Juergen Pfeifer                         2009                    *
+ *     and:  Juergen Pfeifer,                       1998,2009               *
+ *     and:  Thomas E. Dickey                       1998-on                 *
  ****************************************************************************/
 
 /*
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slklab.c,v 1.8 2009/02/15 00:42:53 tom Exp $")
+MODULE_ID("$Id: lib_slklab.c,v 1.9 2009/02/21 18:48:42 tom Exp $")
 
 NCURSES_EXPORT(char *)
 NCURSES_SP_NAME(slk_label) (NCURSES_SP_DCLx int n)
 {
-    T((T_CALLED("slk_label(%d)"), n));
+    T((T_CALLED("slk_label(%p,%d)"), SP_PARM, n));
 
-    if (SP_PARM == NULL || SP_PARM->_slk == NULL || n < 1 || n > SP_PARM->_slk->labcnt)
+    if (SP_PARM == 0 || SP_PARM->_slk == 0 || n < 1 || n > SP_PARM->_slk->labcnt)
        returnPtr(0);
     returnPtr(SP_PARM->_slk->ent[n - 1].ent_text);
 }
index 51d0bfdec2d8c518337082b65fc745de8e55b1ed..fa09bbf5a5ed9501f9a5185bd28a22d453094404 100644 (file)
@@ -44,7 +44,7 @@
 #endif
 #endif
 
-MODULE_ID("$Id: lib_slkset.c,v 1.18 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.19 2009/02/21 17:34:06 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
@@ -57,7 +57,7 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
     const char *str = astr;
     const char *p;
 
-    T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format));
+    T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), SP_PARM, i, str, format));
 
     if (SP_PARM == 0
        || (slk = SP_PARM->_slk) == 0
@@ -66,7 +66,7 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
        || format < 0
        || format > 2)
        returnCode(ERR);
-    if (str == NULL)
+    if (str == 0)
        str = "";
     --i;                       /* Adjust numbering of labels */
 
index 7520bd15cca28dc3082f2d3a732d9b0c3547e40a..d27207ffc149c0a56d43dcc3011df0414f3ae331 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slktouch.c,v 1.6 2009/02/15 00:44:36 tom Exp $")
+MODULE_ID("$Id: lib_slktouch.c,v 1.7 2009/02/21 17:42:59 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_touch) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_touch()")));
+    T((T_CALLED("slk_touch(%p)"), SP_PARM));
 
-    if (SP_PARM == NULL || SP_PARM->_slk == NULL)
+    if (SP_PARM == 0 || SP_PARM->_slk == 0)
        returnCode(ERR);
     SP_PARM->_slk->dirty = TRUE;
 
index 18da9c594945d18ed4b0750f4fa3122afff9a08f..5fb3f9e3aaf67dbe54d29be65623cbc4fbc995a3 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_winch.c,v 1.5 2001/06/02 23:42:08 skimo Exp $")
+MODULE_ID("$Id: lib_winch.c,v 1.6 2008/11/16 00:19:59 juergen Exp $")
 
 NCURSES_EXPORT(chtype)
 winch(WINDOW *win)
 {
     T((T_CALLED("winch(%p)"), win));
     if (win != 0) {
-       returnChar(CharOf(win->_line[win->_cury].text[win->_curx]) |
-                  AttrOf(win->_line[win->_cury].text[win->_curx]));
+       returnChtype(CharOf(win->_line[win->_cury].text[win->_curx]) |
+                    AttrOf(win->_line[win->_cury].text[win->_curx]));
     } else {
-       returnChar(0);
+       returnChtype(0);
     }
 }
index c4263c7e50eb22aad5dd88234c837d5e0cabbf3b..402bd2f7aa0d84c7c56ff3232073be4ed5ce5686 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: tries.c,v 1.27 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: tries.c,v 1.28 2008/11/16 00:19:59 juergen Exp $")
 
 /*
  * Expand a keycode into the string that it corresponds to, returning null if
@@ -72,7 +72,9 @@ _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
            *((unsigned char *) (result + len)) = 128;
 #ifdef TRACE
        if (len == 0 && USE_TRACEF(TRACE_MAXIMUM)) {
-           _tracef("expand_key %s %s", _nc_tracechar(SP, code), _nc_visbuf(result));
+           _tracef("expand_key %s %s",
+                   _nc_tracechar(CURRENT_SCREEN, code),
+                   _nc_visbuf(result));
            _nc_unlock_global(tracef);
        }
 #endif
index 32c4fe4cc84571a7f662c9d4dc8d284e4ce4f3cb..20ca3623a19f32677863f5b69a9656191d62c3bd 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.399 2009/02/15 01:05:47 tom Exp $
+ * $Id: curses.priv.h,v 1.402 2009/02/21 22:54:34 tom Exp $
  *
  *     curses.priv.h
  *
@@ -319,7 +319,7 @@ color_t;
 #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 *);
+extern NCURSES_EXPORT(void)     _nc_set_no_padding(SCREEN *);
 #else
 #define GetNoPadding(sp)       FALSE
 #define SetNoPadding(sp)       /*nothing*/
@@ -496,13 +496,13 @@ typedef struct
 } slk_ent;
 
 typedef struct _SLK {
-       char dirty;             /* all labels have changed */
-       char hidden;            /* soft labels are hidden */
-       WINDOW *win;
+       bool    dirty;          /* all labels have changed */
+       bool    hidden;         /* soft labels are hidden */
+       WINDOW  *win;
        slk_ent *ent;
-       short  maxlab;          /* number of available labels */
-       short  labcnt;          /* number of allocated labels */
-       short  maxlen;          /* length of labels */
+       short   maxlab;         /* number of available labels */
+       short   labcnt;         /* number of allocated labels */
+       short   maxlen;         /* length of labels */
        NCURSES_CH_T attr;      /* soft label attribute */
 } SLK;
 
@@ -735,8 +735,8 @@ struct screen {
        char            *_setbuf;       /* buffered I/O for output          */
        bool            _filtered;      /* filter() was called              */
        bool            _buffered;      /* setvbuf uses _setbuf data        */
-        bool            _prescreen;     /* is in prescreen phase            */
-        bool            _use_env;       /* LINES & COLS from environment?   */
+       bool            _prescreen;     /* is in prescreen phase            */
+       bool            _use_env;       /* LINES & COLS from environment?   */
        int             _checkfd;       /* filedesc for typeahead check     */
        TERMINAL        *_term;         /* terminal type information        */
        TTY             _saved_tty;     /* savetty/resetty information      */
@@ -1299,7 +1299,7 @@ extern NCURSES_EXPORT(void)       _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
 #define returnBool(code)       TRACE_RETURN(code,bool)
 #define returnCPtr(code)       TRACE_RETURN(code,cptr)
 #define returnCVoidPtr(code)   TRACE_RETURN(code,cvoid_ptr)
-#define returnChar(code)       TRACE_RETURN(code,chtype)
+#define returnChtype(code)     TRACE_RETURN(code,chtype)
 #define returnCode(code)       TRACE_RETURN(code,int)
 #define returnPtr(code)                TRACE_RETURN(code,ptr)
 #define returnSP(code)         TRACE_RETURN(code,sp)
@@ -1358,7 +1358,7 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int);
 #define returnBool(code)       return code
 #define returnCPtr(code)       return code
 #define returnCVoidPtr(code)   return code
-#define returnChar(code)       return code
+#define returnChtype(code)     return code
 #define returnCode(code)       return code
 #define returnPtr(code)                return code
 #define returnSP(code)         return code
@@ -1753,6 +1753,66 @@ extern NCURSES_EXPORT(int) _nc_ripoffline (int line, int (*init)(WINDOW *,int));
 #define MSG_NO_MEMORY "Out of memory"
 #define MSG_NO_INPUTS "Premature EOF"
 
+/* timed_wait flag definitions */
+#define TW_NONE    0
+#define TW_INPUT   1
+#define TW_MOUSE   2
+#define TW_ANY     (TW_INPUT | TW_MOUSE)
+#define TW_EVENT   4
+
+/*
+ * Exported entrypoints beyond the published API
+ */
+extern NCURSES_EXPORT(WINDOW *) _nc_curscr_of(SCREEN*);
+extern NCURSES_EXPORT(WINDOW *) _nc_newscr_of(SCREEN*);
+extern NCURSES_EXPORT(WINDOW *) _nc_stdscr_of(SCREEN*);
+extern NCURSES_EXPORT(int)      _nc_outc_wrapper(SCREEN*,int);
+
+extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_set_curterm)(SCREEN*,TERMINAL*);
+extern NCURSES_EXPORT(int)       NCURSES_SP_NAME(_nc_del_curterm)(SCREEN*,TERMINAL*);
+
+#if NCURSES_EXT_FUNCS
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int);
+#endif
+
+extern NCURSES_EXPORT(chtype)   NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int);
+
+/*
+ * We put the safe versions of various calls here as they are not published
+ * part of the API up to now
+ */
+extern NCURSES_EXPORT(SCREEN*)  _nc_SP(void);
+
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int));
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vidattr)(SCREEN *, chtype);
+
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*);
+
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_restartterm)(SCREEN*,NCURSES_CONST char*,int,int*);
+extern NCURSES_EXPORT(bool)     NCURSES_SP_NAME(_nc_is_term_resized)(SCREEN*,int,int);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resizeterm)(SCREEN*,int,int);
+
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tputs)(SCREEN*,const char*,int,int(*)(SCREEN*, int));
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_savetty)(SCREEN*);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
+
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
+extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_tgetstr)(SCREEN*,NCURSES_CONST char*,char**);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetflag)(SCREEN*,NCURSES_CONST char*);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetnum)(SCREEN*,NCURSES_CONST char*);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetflag)(SCREEN*,NCURSES_CONST char*);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
+extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_tigetstr)(SCREEN*, NCURSES_CONST char*);
+extern NCURSES_EXPORT(void)     _nc_cookie_init(SCREEN *sp);
+extern NCURSES_EXPORT(int)      _nc_tinfo_doupdate(SCREEN *sp);
+extern NCURSES_EXPORT(int)      _nc_tinfo_mcprint(SCREEN*,char*,int);
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(wchar_t *) NCURSES_SP_NAME(_nc_wunctrl)(SCREEN*, cchar_t *);
+#endif
+
 #ifdef __cplusplus
 }
 #endif
index 7e5074480864d7d871171f03aa9efb8bc2a91801..fd9b9d64280717af7201c28e74a4b6f612c1bc5a 100644 (file)
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKnames.awk,v 1.20 2008/10/11 21:07:56 tom Exp $
+# $Id: MKnames.awk,v 1.21 2008/11/16 00:19:59 juergen Exp $
 function large_item(value) {
        result = sprintf("%d,", offset);
        offset = offset + length(value) + 1;
@@ -107,8 +107,6 @@ END {
                print  ""
                print  "#if BROKEN_LINKER || USE_REENTRANT"
                print  ""
-               print  "#include <term.h>"
-               print  ""
                if (bigstrings) {
                        printf "static const char _nc_name_blob[] = \n"
                        printf "%s;\n", bigstr;
index 8964875ac6ef3ed6005610ec4d9ba95d10c886a4..9163c7cd68a2f01e055bde87e67626173c1c6a4e 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_termname.c,v 1.10 2009/02/15 01:07:06 tom Exp $")
+MODULE_ID("$Id: lib_termname.c,v 1.11 2009/02/21 16:37:12 tom Exp $")
 
 NCURSES_EXPORT(char *)
 NCURSES_SP_NAME(termname) (NCURSES_SP_DCL0)
 {
     char *name = 0;
 
-    T((T_CALLED("termname()")));
+    T((T_CALLED("termname(%p)"), SP_PARM));
 
 #if NCURSES_SP_FUNCS
     if (TerminalOf(SP_PARM) != 0) {
index ba2a8404030edda6b0df1d2c60353c561a4a4745..806b21c181e4ce6ff456f0aa2deda31a389ddcf3 100644 (file)
 #include <curses.priv.h>
 
 #include <ctype.h>
-#include <term.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.76 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.77 2008/11/16 00:19:59 juergen Exp $")
 
 /*
  *     char *
index c084f87fb94375774cb1fdb4cac9497c2f9fe94b..8eb4a9afc6a5928d423b32c18933987c138b44a6 100644 (file)
 #define USE_TERMLIB 1
 #include <curses.priv.h>
 
-MODULE_ID("$Id: make_keys.c,v 1.14 2008/08/03 21:57:22 tom Exp $")
+MODULE_ID("$Id: make_keys.c,v 1.15 2008/11/16 00:19:59 juergen Exp $")
 
 #include <names.c>
 
 #define UNKNOWN (SIZEOF(strnames) + SIZEOF(strfnames))
 
-static size_t
+static unsigned
 lookup(const char *name)
 {
-    size_t n;
+    unsigned n;
     bool found = FALSE;
     for (n = 0; strnames[n] != 0; n++) {
        if (!strcmp(name, strnames[n])) {
@@ -73,7 +73,7 @@ make_keys(FILE *ifp, FILE *ofp)
     char buffer[BUFSIZ];
     char from[256];
     char to[256];
-    int maxlen = 16;
+    unsigned maxlen = 16;
     int scanned;
 
     while (fgets(buffer, sizeof(buffer), ifp) != 0) {
@@ -85,10 +85,10 @@ make_keys(FILE *ifp, FILE *ofp)
 
        scanned = sscanf(buffer, "%255s %255s", to, from);
        if (scanned == 2) {
-           int code = lookup(from);
+           unsigned code = lookup(from);
            if (code == UNKNOWN)
                continue;
-           if ((int) strlen(from) > maxlen)
+           if (strlen(from) > maxlen)
                maxlen = strlen(from);
            fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n",
                    code,
index d576901fa2e93f8bffbea1424eb7de34e8e9c800..a9ac642788883011bbc12f252cfa90cc41a26324 100644 (file)
  ****************************************************************************/
 
 #include <curses.priv.h>
-#include <term.h>
 #include <tic.h>
 
-MODULE_ID("$Id: name_match.c,v 1.17 2008/08/03 19:49:33 tom Exp $")
+MODULE_ID("$Id: name_match.c,v 1.18 2008/11/16 00:19:59 juergen Exp $")
 
 /*
  *     _nc_first_name(char *names)
index 6c3b12fb92389a45632a2733a70cf1076123f9b5..3b3f7361d91699623e700f7dcb48905fc7c69e42 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: use_screen.c,v 1.6 2008/06/07 19:16:56 tom Exp $")
+MODULE_ID("$Id: use_screen.c,v 1.7 2008/11/16 00:19:59 juergen Exp $")
 
 NCURSES_EXPORT(int)
 use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
@@ -47,7 +47,7 @@ use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
      * recurred through this point, return an error if so.
      */
     _nc_lock_global(curses);
-    save_SP = SP;
+    save_SP = CURRENT_SCREEN;
     set_term(screen);
 
     code = func(screen, data);
index cc441b391e5b2722ad82ca7a2589cde97895d407..f8798fdb00dd3b0294151c1f67e03eac831333fa 100644 (file)
@@ -33,9 +33,8 @@
  ****************************************************************************/
 
 #include <curses.priv.h>
-#include <term.h>              /* cur_term */
 
-MODULE_ID("$Id: lib_tracebits.c,v 1.17 2008/08/03 16:09:26 tom Exp $")
+MODULE_ID("$Id: lib_tracebits.c,v 1.18 2008/11/16 00:19:59 juergen Exp $")
 
 #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
 #define _POSIX_SOURCE
index 74cc177d51bb841bb08cdeda14c5e2e6adebcb07..cf7539e80135047edcb6c6abfac45625e3c6a2ab 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_tracemse.c,v 1.15 2008/08/03 15:39:29 tom Exp $")
+MODULE_ID("$Id: lib_tracemse.c,v 1.16 2008/11/16 00:19:59 juergen Exp $")
 
 #ifdef TRACE
 
@@ -117,7 +117,7 @@ _nc_tracemouse(SCREEN *sp, MEVENT const *ep)
 NCURSES_EXPORT(char *)
 _tracemouse(MEVENT const *ep)
 {
-    return _nc_tracemouse(SP, ep);
+    return _nc_tracemouse(CURRENT_SCREEN, ep);
 }
 
 #else /* !TRACE */
index f4ee46710abb74d347ace47536f71e9d6235e26b..541173d27459e4a503203d0dfa4bbfdbd2a282fb 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: varargs.c,v 1.7 2008/08/03 15:42:49 tom Exp $")
+MODULE_ID("$Id: varargs.c,v 1.8 2008/11/16 00:19:59 juergen Exp $")
 
 #ifdef TRACE
 
@@ -44,7 +44,7 @@ typedef enum {
     atUnknown = 0, atInteger, atFloat, atPoint, atString
 } ARGTYPE;
 
-#define VA_INT(type) ival = va_arg(ap, type)
+#define VA_INT(type) ival = (int) va_arg(ap, type)
 #define VA_FLT(type) fval = va_arg(ap, type)
 #define VA_PTR(type) pval = (char *)va_arg(ap, type)
 #define VA_STR(type) sval = va_arg(ap, type)
index ab7a165ae3226861b1966374a3b086fe2d7e9df1..6c4f9e2f24205aba9c43611af13ea744af1e6777 100644 (file)
@@ -66,7 +66,7 @@
 #include <curses.priv.h>
 #include <term.h>
 
-MODULE_ID("$Id: lib_vidattr.c,v 1.50 2009/02/15 00:51:03 tom Exp $")
+MODULE_ID("$Id: lib_vidattr.c,v 1.51 2009/02/21 21:43:40 tom Exp $")
 
 #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
 
@@ -335,7 +335,7 @@ NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
     if (SP_PARM->_coloron)
        attrs |= A_COLOR;
 
-    returnChar(attrs);
+    returnChtype(attrs);
 }
 
 #if NCURSES_SP_FUNCS
index b4a0c37a285f9b8b1198a32783d7c8f673f6629b..8f373eba6b4fa827254823584b7aa75407594cc2 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2005,2007 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            *
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_cchar.c,v 1.12 2007/05/12 19:03:06 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.13 2008/11/16 00:19:59 juergen Exp $")
 
 /* 
  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
@@ -50,8 +50,8 @@ setcchar(cchar_t *wcval,
         short color_pair,
         const void *opts)
 {
-    int i;
-    int len;
+    unsigned i;
+    unsigned len;
     int code = OK;
 
     TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
index baa70a5a53f966caeeb99ec248967e07130c9b47..bbfbbbd24c2dbb6a06e0a449a345592e6b7f72e6 100644 (file)
@@ -38,9 +38,8 @@
 */
 
 #include <curses.priv.h>
-#include <term.h>
 
-MODULE_ID("$Id: lib_get_wstr.c,v 1.10 2008/08/16 19:25:33 tom Exp $")
+MODULE_ID("$Id: lib_get_wstr.c,v 1.11 2008/11/16 00:19:59 juergen Exp $")
 
 static int
 wadd_wint(WINDOW *win, wint_t *src)
index fe893b4d2f8b4ef17065e4ca82d035eb535056d0..5e2c9fdfdba8da99d1a5ac72ab69c4648849948b 100644 (file)
@@ -31,9 +31,8 @@
  ****************************************************************************/
 
 #include <curses.priv.h>
-#include <term.h>
 
-MODULE_ID("$Id: lib_wacs.c,v 1.7 2006/12/17 15:16:17 tom Exp $")
+MODULE_ID("$Id: lib_wacs.c,v 1.8 2008/11/16 00:19:59 juergen Exp $")
 
 NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;