]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20090523
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 May 2009 01:18:15 +0000 (01:18 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 May 2009 01:18:15 +0000 (01:18 +0000)
+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).

15 files changed:
NEWS
dist.mk
include/curses.h.in
include/curses.tail
ncurses/base/lib_beep.c
ncurses/base/lib_delwin.c
ncurses/base/lib_dft_fgbg.c
ncurses/base/lib_flash.c
ncurses/base/lib_slkinit.c
ncurses/base/wresize.c
ncurses/curses.priv.h
ncurses/tinfo/MKcodes.awk
ncurses/tinfo/lib_options.c
ncurses/tinfo/lib_termcap.c
ncurses/tinfo/lib_tputs.c

diff --git a/NEWS b/NEWS
index 7d93054a7c2d78da0a01d2e97e42c2ff4d1e0c98..98b5d4d26e273ceb76d603b8c752b25d17fbc734 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.1388 2009/05/17 00:20:31 tom Exp $
+-- $Id: NEWS,v 1.1389 2009/05/23 22:48:27 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.
 
+20090523
+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
 20090516
        + work around antique BSD game's manipulation of stdscr, etc., versus
          SCREEN's copy of the pointer (Debian #528411).
diff --git a/dist.mk b/dist.mk
index de34e5ded2a45b62559023815e3dc75d6cac4add..f52e386da4ef137bd800b5c67e89770334de68ad 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.700 2009/05/15 23:35:19 tom Exp $
+# $Id: dist.mk,v 1.701 2009/05/23 18:08:28 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 = 20090516
+NCURSES_PATCH = 20090523
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 665645b22976af0b020699ea2b9d0529eb645a5c..3fae546d8d816a1609f6dff1dc33b044b90ae2c7 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.200 2009/05/16 23:27:59 tom Exp $ */
+/* $Id: curses.h.in,v 1.201 2009/05/23 21:31:35 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -917,6 +917,7 @@ extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented
 extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *);                     /* implemented */
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay)(SCREEN*, int); /* implemented */
 extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented */
 extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented */
index fb2b8c84f3c64c1634365c5f5972d9af3b2ae455..9477a15083043394fc256fc5cf437c85689c3727 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.18 2009/04/18 21:30:52 tom Exp $ */
+/* $Id: curses.tail,v 1.19 2009/05/23 19:19:43 tom Exp $ */
 /*
  * vile:cmode:
  * This file is part of ncurses, designed to be appended after curses.h.in
@@ -120,6 +120,7 @@ extern NCURSES_EXPORT(int) has_key (int);           /* do we have given key? */
 
 #if NCURSES_SP_FUNCS
 extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int);    /* do we have given key? */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int);    /* direct data to printer */
 #endif
 
 /* Debugging : use with libncurses_g.a */
index 0093a38246f2d61b69ec5eddc78b8c945bf52509..0bad4c1699ccf29bea3929870f42af635590b204 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,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>
-#include <term.h>              /* beep, flash */
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_beep.c,v 1.13 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_beep.c,v 1.14 2009/05/23 19:33:20 tom Exp $")
 
 /*
  *     beep()
@@ -62,8 +61,12 @@ NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
 {
     int res = ERR;
 
-    T((T_CALLED("beep()")));
+    T((T_CALLED("beep(%p)"), SP_PARM));
 
+#ifdef USE_TERM_DRIVER
+    if (SP_PARM != 0)
+       res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
+#else
     /* FIXME: should make sure that we are not in altchar mode */
     if (cur_term == 0) {
        res = ERR;
@@ -76,6 +79,7 @@ NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
        res = putp(flash_screen);
        _nc_flush();
     }
+#endif
 
     returnCode(res);
 }
index e7a4b89df2d4a470136166d243061f8cf45d437d..59fa3f772d2afb9e9cd5a6608bae881b09aad2b5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * 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            *
@@ -29,6 +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                         2008                    *
  ****************************************************************************/
 
 /*
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delwin.c,v 1.18 2009/05/09 18:30:57 tom Exp $")
+MODULE_ID("$Id: lib_delwin.c,v 1.19 2009/05/23 19:56:55 tom Exp $")
 
 static bool
 cannot_delete(WINDOW *win)
 {
     WINDOWLIST *p;
     bool result = TRUE;
+#ifdef USE_SP_WINDOWLIST
+    SCREEN *sp = _nc_screen_of(win);
+#endif
 
-    for (each_window(SP, p)) {
+    for (each_window(SP_PARM, p)) {
        if (&(p->win) == win) {
            result = FALSE;
        } else if ((p->win._flags & _SUBWIN) != 0
@@ -72,11 +77,13 @@ delwin(WINDOW *win)
            || cannot_delete(win)) {
            result = ERR;
        } else {
-
+#if NCURSES_SP_FUNCS
+           SCREEN *sp = _nc_screen_of(win);
+#endif
            if (win->_flags & _SUBWIN)
                touchwin(win->_parent);
-           else if (curscr != 0)
-               touchwin(curscr);
+           else if (CurScreen(SP_PARM) != 0)
+               touchwin(CurScreen(SP_PARM));
 
            result = _nc_freewin(win);
        }
index 1d8f5d24d6e6fc1eebc962a16d3b7f7433d01f0c..eda197619189a98222d6c81b539cdf5e6bd8d338 100644 (file)
  ****************************************************************************/
 
 #include <curses.priv.h>
-#include <term.h>
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.21 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.23 2009/05/23 23:04:15 tom Exp $")
 
 /*
  * Modify the behavior of color-pair 0 so that the library doesn't assume that
@@ -47,7 +46,7 @@ MODULE_ID("$Id: lib_dft_fgbg.c,v 1.21 2009/05/10 00:48:29 tom Exp $")
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(use_default_colors) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("use_default_colors()")));
+    T((T_CALLED("use_default_colors(%p)"), SP_PARM));
     returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx -1, -1));
 }
 
@@ -66,25 +65,29 @@ use_default_colors(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
 {
-    T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
+    int code = ERR;
 
-    if (!orig_pair && !orig_colors)
-       returnCode(ERR);
+    T((T_CALLED("assume_default_colors(%p,%d,%d)"), SP_PARM, fg, bg));
+#ifdef USE_TERM_DRIVER
+    if (SP_PARM != 0)
+       code = CallDriver_2(SP_PARM, defaultcolors, fg, bg);
+#else
+    if ((orig_pair || orig_colors) && !initialize_pair) {
 
-    if (initialize_pair)       /* don't know how to handle this */
-       returnCode(ERR);
-
-    SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
-    SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
-    SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
-    SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
-    if (SP_PARM->_color_pairs != 0) {
-       bool save = SP_PARM->_default_color;
-       SP_PARM->_default_color = TRUE;
-       init_pair(0, (short) fg, (short) bg);
-       SP_PARM->_default_color = save;
+       SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
+       SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
+       SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
+       SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
+       if (SP_PARM->_color_pairs != 0) {
+           bool save = SP_PARM->_default_color;
+           SP_PARM->_default_color = TRUE;
+           init_pair(0, (short) fg, (short) bg);
+           SP_PARM->_default_color = save;
+       }
+       code = OK;
     }
-    returnCode(OK);
+#endif
+    returnCode(code);
 }
 
 #if NCURSES_SP_FUNCS
index 68fea1349d7a42934e3a3de08e0d5db5683cb6fe..8fbf91cf3a540afe1c46019125d1cdd062b43ef1 100644 (file)
  */
 
 #include <curses.priv.h>
-#include <term.h>              /* beep, flash */
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_flash.c,v 1.9 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.10 2009/05/23 19:37:09 tom Exp $")
 
 /*
  *     flash()
@@ -62,8 +61,11 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
 {
     int res = ERR;
 
-    T((T_CALLED("flash()")));
-
+    T((T_CALLED("flash(%p)"), SP_PARM));
+#ifdef USE_TERM_DRIVER
+    if (SP_PARM != 0)
+       res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
+#else
     /* FIXME: should make sure that we are not in altchar mode */
     if (flash_screen) {
        TPUTS_TRACE("flash_screen");
@@ -74,7 +76,7 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
        res = putp(bell);
        _nc_flush();
     }
-
+#endif
     returnCode(res);
 }
 
index 29cfeedbae4ea29ab5b0f68d15a1542f098f5ee0..e7fa1221eb02819ec6a2648e0545eba4714767d0 100644 (file)
@@ -30,6 +30,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                 *
+ *     and: Juergen Pfeifer                         2009                    *
  ****************************************************************************/
 
 /*
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkinit.c,v 1.10 2009/05/09 18:32:07 tom Exp $")
+MODULE_ID("$Id: lib_slkinit.c,v 1.11 2009/05/23 23:32:57 tom Exp $")
+
+#ifdef USE_SP_RIPOFF
+#define SoftkeyFormat SP_PARM->slk_format
+#else
+#define SoftkeyFormat _nc_globals.slk_format
+#endif
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
@@ -48,11 +55,16 @@ NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
 
     T((T_CALLED("slk_init(%p,%d)"), SP_PARM, format));
 
-    if (SP_PARM && format >= 0 && format <= 3 && !SP_PARM->slk_format &&
-       SP_PARM->_prescreen) {
-       SP_PARM->slk_format = 1 + format;
+    if (format >= 0
+       && format <= 3
+#ifdef USE_SP_RIPOFF
+       && SP_PARM
+       && SP_PARM->_prescreen
+#endif
+       && !SoftkeyFormat) {
+       SoftkeyFormat = 1 + format;
        code = NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
-                                               -SLK_LINES(SP_PARM->slk_format),
+                                               -SLK_LINES(SoftkeyFormat),
                                                _nc_slk_initialize);
     }
     returnCode(code);
index 49e0d58af54c6bd610999e3a46c7a22f5802f172..e441b669d7c6b2bcf68616d78ea78b986c9a2008 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * 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            *
  ****************************************************************************/
 
 /****************************************************************************
- *  Author: Thomas E. Dickey 1996-2002                                      *
+ *  Author: Thomas E. Dickey 1996-on                                        *
+ *     and: Juergen Pfeifer                                                 *
  ****************************************************************************/
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.30 2009/05/09 18:37:43 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.31 2009/05/23 19:50:16 tom Exp $")
 
 static int
 cleanup_lines(struct ldat *data, int length)
@@ -53,10 +54,13 @@ repair_subwindows(WINDOW *cmp)
     WINDOWLIST *wp;
     struct ldat *pline = cmp->_line;
     int row;
+#ifdef USE_SP_WINDOWLIST
+    SCREEN *sp = _nc_screen_of(cmp);
+#endif
 
     _nc_lock_global(curses);
 
-    for (each_window(SP, wp)) {
+    for (each_window(SP_PARM, wp)) {
        WINDOW *tst = &(wp->win);
 
        if (tst->_parent == cmp) {
index 007ed445006f25780238104a36645c22b6ca9b55..f6d4c47b840062b51c0d4dc75439d6bb0b96ef44 100644 (file)
@@ -35,7 +35,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.416 2009/05/10 01:01:51 tom Exp $
+ * $Id: curses.priv.h,v 1.417 2009/05/23 23:01:44 tom Exp $
  *
  *     curses.priv.h
  *
@@ -194,9 +194,14 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
 #endif
 
 /*
- * Terminal drivers...
+ * Options for terminal drivers, etc...
  */
-#define USE_TERM_DRIVER 0
+#if 0
+#define USE_SP_RIPOFF     1
+#define USE_SP_TERMTYPE   1
+#define USE_SP_WINDOWLIST 1
+#define USE_TERM_DRIVER   1
+#endif
 
 /*
  * Note:  ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
@@ -678,8 +683,10 @@ typedef struct {
        int             tgetent_index;
        long            tgetent_sequence;
 
+#ifndef USE_SP_WINDOWLIST
        WINDOWLIST      *_nc_windowlist;
 #define WindowList(sp) _nc_globals._nc_windowlist
+#endif
 
 #if USE_HOME_TERMINFO
        char            *home_terminfo;
@@ -740,8 +747,10 @@ typedef struct {
        bool            use_env;
        bool            filter_mode;
        attr_t          previous_attr;
+#ifndef USE_SP_RIPOFF
        ripoff_t        rippedoff[N_RIPS];
        ripoff_t        *rsp;
+#endif
        TPARM_STATE     tparm_state;
        TTY             *saved_tty;     /* savetty/resetty information      */
 #if NCURSES_NO_PADDING
@@ -1002,7 +1011,7 @@ struct screen {
        char            tracechr_buf[40];
        char            tracemse_buf[TRACEMSE_MAX];
 #endif
-#if 0
+#ifdef USE_SP_WINDOWLIST
        WINDOWLIST*     _windowlist;
 #define WindowList(sp)  (sp)->_windowlist
 #endif
@@ -1805,6 +1814,7 @@ extern NCURSES_EXPORT_VAR(SCREEN *) SP;
 #define screen_columns(sp)      (sp)->_columns
 
 extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
+extern NCURSES_EXPORT(int) _nc_format_slks (SCREEN *, int);
 
 /*
  * Some constants related to SLK's
@@ -1830,6 +1840,9 @@ 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"
 
+extern NCURSES_EXPORT(int) _nc_set_tty_mode(TTY *);
+extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
+
 /* timed_wait flag definitions */
 #define TW_NONE    0
 #define TW_INPUT   1
@@ -1937,13 +1950,20 @@ typedef struct DriverTCB
 extern NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette;
 extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette;
 
+#ifdef USE_TERM_DRIVER
+extern NCURSES_EXPORT(int)      _nc_tinfo_has_key(SCREEN*, int);
+extern NCURSES_EXPORT(int)      _nc_tinfo_doupdate(SCREEN *sp);
+extern NCURSES_EXPORT(int)      _nc_tinfo_mvcur(SCREEN*,int,int,int,int);
+extern NCURSES_EXPORT(int)      _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*);
+#endif
+
 #ifdef __MINGW32__
 #include <nc_mingw.h>
 extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
 #endif
 extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
 
-#if USE_TERM_DRIVER
+#ifdef USE_TERM_DRIVER
 #define IsTermInfo(sp)       (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo)))
 #else
 #define IsTermInfo(sp)       TRUE
@@ -1988,7 +2008,7 @@ extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_outch)(SCREEN*, int);
-extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char *);
+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
 extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
@@ -2022,8 +2042,6 @@ extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*);
 extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, bool);
 
 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 defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
 extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_linedump)(SCREEN*);
index 16cbe642d68f36d3b1dc4c012442527f9bb34955..49e2ebc26ce0b6bfea7ef1b5c3204a05775858a3 100644 (file)
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKcodes.awk,v 1.7 2009/03/28 18:22:39 Charles.Wilson Exp $
+# $Id: MKcodes.awk,v 1.8 2009/05/23 19:09:54 tom Exp $
 function large_item(value) {
        result = sprintf("%d,", offset);
        offset = offset + length(value) + 1;
@@ -117,7 +117,7 @@ END {
                        print  "                if ((*value = typeCalloc(NCURSES_CONST char *, size + 1)) != 0) {"
                        print  "                        unsigned n;"
                        print  "                        for (n = 0; n < size; ++n) {"
-                       print  "                                (*value)[n] = _nc_code_blob + offsets[n];"
+                       print  "                                (*value)[n] = (NCURSES_CONST char *) _nc_code_blob + offsets[n];"
                        print  "                        }"
                        print  "                }"
                        print  "        }"
index e81253192cd95f204aa020723166e534cd65eec2..f22d6c5c2fc617adc7a1511b5347a71040fe8591 100644 (file)
 #include <term.h>
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_options.c,v 1.63 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.64 2009/05/23 23:58:07 tom Exp $")
 
 static int _nc_meta(SCREEN *, bool);
 
@@ -262,28 +262,7 @@ has_key(int keycode)
  * than cur_term.
  */
 #undef CUR
-#define CUR SP_TERMTYPE 
-
-NCURSES_EXPORT(int)
-NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
-                          const char *name GCC_UNUSED, const char *value)
-{
-    int rc = ERR;
-
-    if (value) {
-       TPUTS_TRACE(name);
-       rc = putp(value);
-    }
-    return rc;
-}
-
-#if NCURSES_SP_FUNCS
-NCURSES_EXPORT(int)
-_nc_putp(const char *name, const char *value)
-{
-    return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, value);
-}
-#endif
+#define CUR SP_TERMTYPE
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_DCLx
index 4c0097db5a3358cc94b9066d9b061403673bb2dc..fbaacb425364d9573d052e4909a1917e51039401 100644 (file)
@@ -30,6 +30,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                 *
+ *     and: Juergen Pfeifer                                                 *
  *                                                                          *
  * some of the code in here was contributed by:                             *
  * Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93)                      *
 #include <term_entry.h>
 
 #ifndef CUR
-#define CUR SP_TERMTYPE 
+#define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_termcap.c,v 1.65 2009/05/10 00:48:29 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.66 2009/05/23 23:47:34 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -80,11 +81,8 @@ NCURSES_EXPORT_VAR(char *) BC = 0;
  ***************************************************************************/
 
 NCURSES_EXPORT(int)
-tgetent(char *bufp, const char *name)
+NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
 {
-#if NCURSES_SP_FUNCS
-    SCREEN *sp = CURRENT_SCREEN;
-#endif
     int errcode;
     int n;
     bool found_cache = FALSE;
@@ -118,7 +116,7 @@ tgetent(char *bufp, const char *name)
             */
            if (LAST_TRM != 0 && LAST_TRM != cur_term) {
                TERMINAL *trm = LAST_TRM;
-               del_curterm(LAST_TRM);
+               NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx LAST_TRM);
                for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
                    if (LAST_TRM == trm)
                        LAST_TRM = 0;
@@ -171,8 +169,8 @@ tgetent(char *bufp, const char *name)
        LAST_BUF = bufp;
        LAST_USE = TRUE;
 
-       SetNoPadding(SP);
-       (void) baudrate();      /* sets ospeed as a side-effect */
+       SetNoPadding(SP_PARM);
+       (void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);      /* sets ospeed as a side-effect */
 
 /* LINT_PREPRO
 #if 0*/
@@ -184,6 +182,14 @@ tgetent(char *bufp, const char *name)
     returnCode(errcode);
 }
 
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetent(char *bufp, const char *name)
+{
+    return NCURSES_SP_NAME(tgetent) (CURRENT_SCREEN, bufp, name);
+}
+#endif
+
 /***************************************************************************
  *
  * tgetflag(str)
@@ -194,7 +200,7 @@ tgetent(char *bufp, const char *name)
  ***************************************************************************/
 
 NCURSES_EXPORT(int)
-tgetflag(NCURSES_CONST char *id)
+NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx NCURSES_CONST char *id)
 {
     unsigned i;
 
@@ -212,6 +218,14 @@ tgetflag(NCURSES_CONST char *id)
     returnCode(0);             /* Solaris does this */
 }
 
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetflag(NCURSES_CONST char *id)
+{
+    return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id);
+}
+#endif
+
 /***************************************************************************
  *
  * tgetnum(str)
@@ -222,7 +236,7 @@ tgetflag(NCURSES_CONST char *id)
  ***************************************************************************/
 
 NCURSES_EXPORT(int)
-tgetnum(NCURSES_CONST char *id)
+NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx NCURSES_CONST char *id)
 {
     unsigned i;
 
@@ -241,6 +255,14 @@ tgetnum(NCURSES_CONST char *id)
     returnCode(ABSENT_NUMERIC);
 }
 
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetnum(NCURSES_CONST char *id)
+{
+    return NCURSES_SP_NAME(tgetnum) (CURRENT_SCREEN, id);
+}
+#endif
+
 /***************************************************************************
  *
  * tgetstr(str, area)
@@ -251,11 +273,8 @@ tgetnum(NCURSES_CONST char *id)
  ***************************************************************************/
 
 NCURSES_EXPORT(char *)
-tgetstr(NCURSES_CONST char *id, char **area)
+NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
 {
-#if NCURSES_SP_FUNCS
-    SCREEN *sp = CURRENT_SCREEN;
-#endif
     unsigned i;
     char *result = NULL;
 
@@ -288,6 +307,14 @@ tgetstr(NCURSES_CONST char *id, char **area)
     returnPtr(result);
 }
 
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+tgetstr(NCURSES_CONST char *id, char **area)
+{
+    return NCURSES_SP_NAME(tgetstr) (CURRENT_SCREEN, id, area);
+}
+#endif
+
 #if NO_LEAKS
 NCURSES_EXPORT(void)
 _nc_tgetent_leaks(void)
index e3dc8d328977f20b1f7a10b95c45cc7ec3386423..0bea1b7840a3e366473f50d59ae2773b84bab138 100644 (file)
 #endif
 
 #include <ctype.h>
-#include <term.h>              /* padding_baud_rate, xon_xoff */
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.73 2009/05/10 00:54:17 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.74 2009/05/23 23:56:23 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
@@ -158,12 +157,32 @@ NCURSES_SP_NAME(putp) (NCURSES_SP_DCLx const char *string)
                                   string, 1, NCURSES_SP_NAME(_nc_outch));
 }
 
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
+                          const char *name GCC_UNUSED,
+                          const char *string)
+{
+    int rc = ERR;
+
+    if (string != 0) {
+       TPUTS_TRACE(name);
+       rc = NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx string);
+    }
+    return rc;
+}
+
 #if NCURSES_SP_FUNCS
 NCURSES_EXPORT(int)
 putp(const char *string)
 {
     return NCURSES_SP_NAME(putp) (CURRENT_SCREEN, string);
 }
+
+NCURSES_EXPORT(int)
+_nc_putp(const char *name, const char *string)
+{
+    return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, string);
+}
 #endif
 
 NCURSES_EXPORT(int)