ncurses 5.6 - patch 20080920
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 21 Sep 2008 01:01:25 +0000 (01:01 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 21 Sep 2008 01:01:25 +0000 (01:01 +0000)
+ fix shared-library rules for cygwin with tic- and tinfo-libraries.
+ fix a memory leak when failure to connect to GPM.
+ correct check for notimeout() in wgetch() (report on linux.redhat
  newsgroup by FurtiveBertie).
+ add an example warning-suppression file for valgrind,
  misc/ncurses.supp (based on example from Reuben Thomas)

MANIFEST
NEWS
aclocal.m4
configure
dist.mk
misc/ncurses.supp [new file with mode: 0644]
ncurses/base/lib_freeall.c
ncurses/base/lib_getch.c
ncurses/base/lib_mouse.c
ncurses/curses.priv.h

index 335b27dc427e899f95e238fef47f81e7e7c43cf8..cfe442582586136c41f45f3b25d1ff4eb3fae60d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./misc/ncurses-config.in
 ./misc/ncurses.def
 ./misc/ncurses.ref
+./misc/ncurses.supp
 ./misc/panel.def
 ./misc/panel.ref
 ./misc/run_tic.in
diff --git a/NEWS b/NEWS
index ec38695813bab366a053603fb5aa7de2147d6a0f..c8b86fad23e98cf926ddb44d53f17376c9f02e20 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.1289 2008/09/08 20:31:19 tom Exp $
+-- $Id: NEWS,v 1.1296 2008/09/20 21:45:57 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,14 @@ 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.
 
+20080920
+       + fix shared-library rules for cygwin with tic- and tinfo-libraries.
+       + fix a memory leak when failure to connect to GPM.
+       + correct check for notimeout() in wgetch() (report on linux.redhat
+         newsgroup by FurtiveBertie).
+       + add an example warning-suppression file for valgrind,
+         misc/ncurses.supp (based on example from Reuben Thomas)
+
 20080913
        + change shared-library configuration for OpenBSD, make rpath work.
        + build-fixes for using libutf8, e.g., on OpenBSD 3.7
index e526bd1a3f3834e386cfe6cd4f660b21dbb561ac..65a4cc03958dbab7b5853b7e73f2c35427985380 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.463 2008/09/13 16:54:28 tom Exp $
+dnl $Id: aclocal.m4,v 1.465 2008/09/20 23:52:48 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -2076,7 +2076,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 51 updated: 2008/09/13 11:34:16
+dnl CF_LIB_RULES version: 53 updated: 2008/09/20 19:51:59
 dnl ------------
 dnl Append definitions and rules for the given models to the subdirectory
 dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
@@ -2093,6 +2093,12 @@ AC_DEFUN([CF_LIB_RULES],
 [
 CF_LIB_PREFIX(cf_prefix)
 AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
+
+if test $cf_cv_shlib_version = cygdll ; then
+       TINFO_NAME=$TINFO_ARG_SUFFIX
+       TINFO_SUFFIX=.dll
+fi
+
 for cf_dir in $SRC_SUBDIRS
 do
        if test ! -d $srcdir/$cf_dir ; then
@@ -2145,7 +2151,8 @@ do
                        # use autodetected ${cf_prefix} for import lib and static lib, but
                        # use 'cyg' prefix for shared lib.
                        if test $cf_cv_shlib_version = cygdll ; then
-                               LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
+                               cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
+                               LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
                                continue
                        fi
                        fi
@@ -2155,24 +2162,28 @@ do
                if test $cf_dir = ncurses ; then
                        cf_subsets="$LIB_SUBSETS"
                        cf_r_parts="$cf_subsets"
+                       cf_liblist="$LIBS_TO_MAKE"
 
                        while test -n "$cf_r_parts"
                        do
                                cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
                                cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[[^ ]]* //'`
                                if test "$cf_l_parts" != "$cf_r_parts" ; then
+                                       cf_item=
                                        case $cf_l_parts in #(vi
                                        *termlib*) #(vi
-                                               cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
+                                               cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
                                                ;;
                                        *ticlib*)
-                                               cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
+                                               cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
                                                ;;
                                        *)
                                                break
                                                ;;
                                        esac
-                                       LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+                                       if test -n "$cf_item"; then
+                                               LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+                                       fi
                                else
                                        break
                                fi
@@ -2205,22 +2216,21 @@ do
                        if test $cf_dir = ncurses ; then
                                case $cf_subset in
                                *base*)
+                                       cf_libname=${cf_libname}$LIB_SUFFIX
                                        ;;
                                *termlib*)
                                        cf_libname=$TINFO_LIB_SUFFIX
-                                       if test -n "${DFT_ARG_SUFFIX}" ; then
-                                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
-                                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
-                                       fi
                                        ;;
                                ticlib*)
                                        cf_libname=$TICS_LIB_SUFFIX
-                                       if test -n "${DFT_ARG_SUFFIX}" ; then
-                                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
-                                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
-                                       fi
                                        ;;
                                esac
+                       else
+                               cf_libname=${cf_libname}$LIB_SUFFIX
+                       fi
+                       if test -n "${DFT_ARG_SUFFIX}" ; then
+                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
                        fi
 
                        # These dependencies really are for development, not
index 44beba004a1ad2b9ccb14c786ae16954c38cdaac..084e60f27d35242d6667199cd47513690f5585e5 100755 (executable)
--- a/configure
+++ b/configure
@@ -17424,6 +17424,11 @@ done
        esac
 cf_prefix=$LIB_PREFIX
 
+if test $cf_cv_shlib_version = cygdll ; then
+       TINFO_NAME=$TINFO_ARG_SUFFIX
+       TINFO_SUFFIX=.dll
+fi
+
 for cf_dir in $SRC_SUBDIRS
 do
        if test ! -d $srcdir/$cf_dir ; then
@@ -17523,7 +17528,8 @@ do
                        # use autodetected ${cf_prefix} for import lib and static lib, but
                        # use 'cyg' prefix for shared lib.
                        if test $cf_cv_shlib_version = cygdll ; then
-                               LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
+                               cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
+                               LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
                                continue
                        fi
                        fi
                if test $cf_dir = ncurses ; then
                        cf_subsets="$LIB_SUBSETS"
                        cf_r_parts="$cf_subsets"
+                       cf_liblist="$LIBS_TO_MAKE"
 
                        while test -n "$cf_r_parts"
                        do
                                cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
                                cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
                                if test "$cf_l_parts" != "$cf_r_parts" ; then
+                                       cf_item=
                                        case $cf_l_parts in #(vi
                                        *termlib*) #(vi
-                                               cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
+                                               cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
                                                ;;
                                        *ticlib*)
-                                               cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
+                                               cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
                                                ;;
                                        *)
                                                break
                                                ;;
                                        esac
-                                       LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+                                       if test -n "$cf_item"; then
+                                               LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+                                       fi
                                else
                                        break
                                fi
@@ -17643,22 +17653,21 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
                        if test $cf_dir = ncurses ; then
                                case $cf_subset in
                                *base*)
+                                       cf_libname=${cf_libname}$LIB_SUFFIX
                                        ;;
                                *termlib*)
                                        cf_libname=$TINFO_LIB_SUFFIX
-                                       if test -n "${DFT_ARG_SUFFIX}" ; then
-                                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
-                                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
-                                       fi
                                        ;;
                                ticlib*)
                                        cf_libname=$TICS_LIB_SUFFIX
-                                       if test -n "${DFT_ARG_SUFFIX}" ; then
-                                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
-                                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
-                                       fi
                                        ;;
                                esac
+                       else
+                               cf_libname=${cf_libname}$LIB_SUFFIX
+                       fi
+                       if test -n "${DFT_ARG_SUFFIX}" ; then
+                               # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+                               cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
                        fi
 
                        # These dependencies really are for development, not
diff --git a/dist.mk b/dist.mk
index 30f444ccb44a9145792d68764d9ef1f026d68a93..4bd872a40adfffd4c1889bca3ac0a89cf768fd1e 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.660 2008/09/08 19:46:14 tom Exp $
+# $Id: dist.mk,v 1.661 2008/09/20 16:52:23 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 6
-NCURSES_PATCH = 20080913
+NCURSES_PATCH = 20080920
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
diff --git a/misc/ncurses.supp b/misc/ncurses.supp
new file mode 100644 (file)
index 0000000..bca582c
--- /dev/null
@@ -0,0 +1,205 @@
+# $Id: ncurses.supp,v 1.7 2008/09/20 18:43:42 tom Exp $
+##############################################################################
+# Copyright (c) 2008 Free Software Foundation, Inc.                          #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# 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.                                                             #
+##############################################################################
+#
+# This is a warning-suppression file for valgrind and ncurses.
+#
+# ncurses can also be configured using the --disable-leaks option, which
+# allows an application to call _nc_freeall() or _nc_free_and_exit(), to
+# free all of ncurses' "permanent" memory.
+#
+# Some of these leaks can be freed if the application does its own cleanup,
+# for example:
+#      delscreen(SP);
+#      del_curterm(cur_term);
+# However, few applications do this.
+
+{
+   ncurses_leak__nc_add_to_try
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_add_to_try
+}
+
+{
+   ncurses_leak__nc_home_terminfo
+   Memcheck:Leak
+   fun:malloc
+   fun:_nc_home_terminfo
+}
+
+{
+   ncurses_leak__nc_init_wacs
+   Memcheck:Leak
+   fun:calloc
+   fun:_nc_init_wacs
+}
+
+{
+   ncurses_leak__nc_keyname
+   Memcheck:Leak
+   fun:calloc
+   fun:_nc_keyname
+}
+
+{
+   ncurses_leak__nc_keyname_2
+   Memcheck:Leak
+   fun:malloc
+   fun:strdup
+   fun:_nc_keyname
+}
+
+{
+   ncurses_leak__nc_printf_string
+   Memcheck:Leak
+   fun:malloc
+   fun:_nc_doalloc
+   fun:_nc_printf_string
+}
+
+{
+   ncurses_leak__nc_read_termtype
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_read_termtype
+   fun:_nc_read_file_entry
+}
+
+{
+   ncurses_leak__nc_read_termtype_2
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_doalloc
+   fun:_nc_read_termtype
+   fun:_nc_read_file_entry
+}
+
+{
+   ncurses_leak__nc_scroll_optimize
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_hash_map
+   fun:_nc_scroll_optimize
+}
+
+{
+   ncurses_leak__nc_scroll_optimize_2
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_doalloc
+   fun:_nc_scroll_optimize
+}
+
+{
+   ncurses_leak__nc_setupscreen
+   Memcheck:Leak
+   fun:calloc
+   fun:_nc_setupscreen
+   fun:newterm
+}
+
+{
+   ncurses_leak__nc_setupscreen_2
+   Memcheck:Leak
+   fun:calloc
+   fun:newwin
+   fun:_nc_setupscreen
+}
+
+{
+   ncurses_leak__nc_setupterm_1
+   Memcheck:Leak
+   fun:malloc
+   fun:strdup
+   fun:_nc_setupterm
+}
+
+{
+   ncurses_leak__nc_setupterm
+   Memcheck:Leak
+   fun:calloc
+   fun:_nc_setupterm
+}
+
+{
+   ncurses_leak__nc_setupscreen_3
+   Memcheck:Leak
+   fun:calloc
+   fun:_nc_makenew
+   fun:newwin
+   fun:_nc_setupscreen
+}
+
+{
+   ncurses_leak__nc_set_buffer
+   Memcheck:Leak
+   fun:malloc
+   fun:_nc_set_buffer
+}
+
+{
+   ncurses_leak__nc_tparm_analyze
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_doalloc
+   fun:_nc_tparm_analyze
+}
+
+{
+   ncurses_leak__nc_trace_alloc
+   Memcheck:Leak
+   fun:*alloc
+   fun:_nc_doalloc
+   fun:_nc_trace_alloc
+}
+
+{
+   ncurses_leak_start_color
+   Memcheck:Leak
+   fun:calloc
+   fun:start_color
+}
+
+{
+   ncurses_leak_tparm
+   Memcheck:Leak
+   fun:realloc
+   fun:_nc_doalloc
+   fun:tparm
+}
+
+{
+   ncurses_leak_tparam_internal
+   Memcheck:Leak
+   fun:realloc
+   fun:_nc_doalloc
+   fun:get_space
+   fun:save_number
+   fun:tparam_internal
+}
index ad7028efc41e1989c4355dcfb78a919f4281795c..e3625a2ffe2a414e3fd7786ec6e40eb8529d299e 100644 (file)
@@ -40,7 +40,7 @@
 extern int malloc_errfd;       /* FIXME */
 #endif
 
-MODULE_ID("$Id: lib_freeall.c,v 1.52 2008/08/31 00:50:36 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.53 2008/09/20 18:28:51 tom Exp $")
 
 /*
  * Free all ncurses data.  This is used for testing only (there's no practical
@@ -142,4 +142,14 @@ NCURSES_EXPORT(void)
 _nc_freeall(void)
 {
 }
+
+NCURSES_EXPORT(void)
+_nc_free_and_exit(int code)
+{
+    if (SP)
+       delscreen(SP);
+    if (cur_term != 0)
+       del_curterm(cur_term);
+    exit(code);
+}
 #endif
index f17b8336f35bed0214d353f927875a09f3669a5d..a3812bee76e8003cdf946bcb9aa8503fc9099e38 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.98 2008/08/16 21:20:48 Werner.Fink Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -381,7 +381,7 @@ _nc_wgetch(WINDOW *win,
 
     recur_wrefresh(win);
 
-    if (!win->_notimeout && (win->_delay >= 0 || sp->_cbreak > 1)) {
+    if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
        if (head == -1) {       /* fifo is empty */
            int delay;
            int rc;
index b6229cf4a8a7f2bf5bc88026989352d30385a813..e92be5b92fe0f8a716bf8876070aa6b4f1845284 100644 (file)
@@ -79,7 +79,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_mouse.c,v 1.97 2008/08/16 18:55:01 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.98 2008/09/20 21:26:19 tom Exp $")
 
 #include <term.h>
 #include <tic.h>
@@ -150,7 +150,7 @@ make an error
 #define LIBGPM_SONAME "libgpm.so"
 #endif
 
-#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(obj, #name))
+#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(SP->_dlopen_gpm, #name))
 
 #endif                         /* USE_GPM_SUPPORT */
 
@@ -415,6 +415,15 @@ enable_gpm_mouse(SCREEN *sp, int enable)
        }
        result = FALSE;
     }
+#ifdef HAVE_LIBDL
+    if (!result && (SP->_dlopen_gpm != 0)) {
+       T(("unload GPM library"));
+       SP->_mouse_gpm_found = FALSE;
+       SP->_mouse_gpm_loaded = FALSE;
+       dlclose(SP->_dlopen_gpm);
+       SP->_dlopen_gpm = 0;
+    }
+#endif
     returnBool(result);
 }
 #endif /* USE_GPM_SUPPORT */
@@ -431,15 +440,13 @@ initialize_mousetype(SCREEN *sp)
     if (allow_gpm_mouse()) {
        if (!sp->_mouse_gpm_loaded) {
 #ifdef HAVE_LIBDL
-           void *obj;
-
-           if ((obj = dlopen(LIBGPM_SONAME, my_RTLD)) != 0) {
+           if ((SP->_dlopen_gpm = dlopen(LIBGPM_SONAME, my_RTLD)) != 0) {
                if (GET_DLSYM(gpm_fd) == 0 ||
                    GET_DLSYM(Gpm_Open) == 0 ||
                    GET_DLSYM(Gpm_Close) == 0 ||
                    GET_DLSYM(Gpm_GetEvent) == 0) {
                    T(("GPM initialization failed: %s", dlerror()));
-                   dlclose(obj);
+                   dlclose(SP->_dlopen_gpm);
                } else {
                    sp->_mouse_gpm_found = TRUE;
                }
index 57f1f8e208d9661b1a41e108dd5d1bd068414904..a2e8fb2211c9463b9604291d951378374ceb0d13 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.390 2008/09/07 14:01:37 tom Exp $
+ * $Id: curses.priv.h,v 1.392 2008/09/20 21:14:11 tom Exp $
  *
  *     curses.priv.h
  *
@@ -845,6 +845,7 @@ struct screen {
        bool            _mouse_gpm_loaded;
        bool            _mouse_gpm_found;
 #ifdef HAVE_LIBDL
+       void            *_dlopen_gpm;
        TYPE_gpm_fd     _mouse_gpm_fd;
        TYPE_Gpm_Open   _mouse_Gpm_Open;
        TYPE_Gpm_Close  _mouse_Gpm_Close;
@@ -1592,6 +1593,7 @@ extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, bool, int);
 extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *));
 extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, int (*)(int));
 extern NCURSES_EXPORT(void) _nc_flush (void);
+extern NCURSES_EXPORT(void) _nc_free_and_exit (int);
 extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *);
 extern NCURSES_EXPORT(void) _nc_freeall (void);
 extern NCURSES_EXPORT(void) _nc_hash_map (void);