From: Thomas E. Dickey Date: Sun, 26 Oct 2008 01:07:21 +0000 (+0000) Subject: ncurses 5.6 - patch 20081025 X-Git-Tag: v5.7~1 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=e116460ef1091a4bbf0a97e04459d9b4f95b6165;ds=sidebyside ncurses 5.6 - patch 20081025 + add a manpage to discuss memory leaks. + add support for shared libraries for QNX (other than libtool, which does not work well on that platform). + build-fix for QNX C++ binding. --- diff --git a/MANIFEST b/MANIFEST index cfe44258..db3871f2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -558,6 +558,7 @@ ./man/curs_inwstr.3x ./man/curs_kernel.3x ./man/curs_legacy.3x +./man/curs_memleaks.3x ./man/curs_mouse.3x ./man/curs_move.3x ./man/curs_opaque.3x diff --git a/NEWS b/NEWS index 87b0e474..6f3de8c4 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1316 2008/10/18 21:51:20 tom Exp $ +-- $Id: NEWS,v 1.1318 2008/10/25 23:39:22 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,12 @@ 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. +20081025 + + add a manpage to discuss memory leaks. + + add support for shared libraries for QNX (other than libtool, which + does not work well on that platform). + + build-fix for QNX C++ binding. + 20081018 + build-fixes for OS/2 EMX. + modify form library to accept control characters such as newline diff --git a/aclocal.m4 b/aclocal.m4 index 12bce3e6..4c8e818f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.469 2008/10/18 21:59:42 tom Exp $ +dnl $Id: aclocal.m4,v 1.470 2008/10/25 22:15:32 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -4147,7 +4147,7 @@ AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 52 updated: 2008/09/13 11:54:48 +dnl CF_SHARED_OPTS version: 53 updated: 2008/10/25 18:14:20 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -4313,7 +4313,7 @@ CF_EOF CF_SHARED_SONAME MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' ;; - openbsd*|freebsd[[12]].*) + nto-qnx*|openbsd*|freebsd[[12]].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -o $[@]' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel diff --git a/c++/internal.h b/c++/internal.h index fc7c0101..3066e72f 100644 --- a/c++/internal.h +++ b/c++/internal.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,25 +31,30 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: internal.h,v 1.15 2007/06/02 15:58:00 tom Exp $ +// $Id: internal.h,v 1.16 2008/10/25 21:35:44 tom Exp $ #ifndef NCURSES_CPLUS_INTERNAL_H #define NCURSES_CPLUS_INTERNAL_H 1 #include -#include - #if USE_RCS_IDS #define MODULE_ID(id) static const char Ident[] = id; #else #define MODULE_ID(id) /*nothing*/ #endif -#define CTRL(x) ((x) & 0x1f) - #ifndef _QNX_SOURCE +#include #include #endif +#ifndef CTRL +#define CTRL(x) ((x) & 0x1f) +#endif + +#ifndef NULL +#define NULL 0 +#endif + #endif /* NCURSES_CPLUS_INTERNAL_H */ diff --git a/configure b/configure index 80d65ef5..1342387c 100755 --- a/configure +++ b/configure @@ -5145,7 +5145,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' ;; - openbsd*|freebsd[12].*) + nto-qnx*|openbsd*|freebsd[12].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel diff --git a/dist.mk b/dist.mk index b0bd69be..9d69946f 100644 --- 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.668 2008/10/18 13:15:11 tom Exp $ +# $Id: dist.mk,v 1.669 2008/10/25 16:27:55 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 = 20081018 +NCURSES_PATCH = 20081025 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/man/curs_memleaks.3x b/man/curs_memleaks.3x new file mode 100644 index 00000000..a8a45525 --- /dev/null +++ b/man/curs_memleaks.3x @@ -0,0 +1,75 @@ +.\"*************************************************************************** +.\" 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. * +.\"*************************************************************************** +.\" +.\" $Id: curs_memleaks.3x,v 1.1 2008/10/25 23:38:13 tom Exp $ +.TH curs_memleaks 3X "" +.na +.hy 0 +.SH NAME +\fB_nc_freeall\fP +\fB_nc_free_and_exit\fP - \fBcurses\fR memory-leak checking +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBvoid _nc_freeall(void);\fR +.br +\fBvoid _nc_free_and_exit(int);\fR +.SH DESCRIPTION +These functions are used to simplify analysis of memory leaks in the ncurses +library. +They are normally not available; they must be configured into the library +at build time using the \fB--disable-leaks\fP option. +That compiles-in code that frees memory that normally would not be freed. +.PP +Any implementation of curses must not free the memory associated with +a screen, since (even after calling \fBendwin\fP), it must be available +for use in the next call to \fBrefresh\fP. +There are also chunks of memory held for performance reasons. +That makes it hard to analyze curses applications for memory leaks. +To work around this, one can build a debugging version of the ncurses +library which frees those chunks which it can, and provides these +functions to free all of the memory allocated by the ncurses library. +.PP +The \fP_nc_free_and_exit\fP function is the preferred one since +some of the memory which is freed may be required for the application +to continue running. +Its parameter is the code to pass to the \fPexit\fP routine. +.SH RETURN VALUE +These functions do not return a value. +.SH PORTABILITY +These functions are not part of the XSI interface. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/man/curs_util.3x b/man/curs_util.3x index 6679de19..18e2b320 100644 --- a/man/curs_util.3x +++ b/man/curs_util.3x @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_util.3x,v 1.26 2008/10/11 20:32:56 tom Exp $ +.\" $Id: curs_util.3x,v 1.27 2008/10/25 23:45:41 tom Exp $ .TH curs_util 3X "" .na .hy 0 @@ -161,11 +161,14 @@ Routines that return pointers return \fBNULL\fR on error. .PP X/Open does not define any error conditions. In this implementation -.RS +.RS 3 .TP 5 \fBflushinp\fR returns an error if the terminal was not initialized. .TP 5 +\fBmeta\fR +returns an error if the terminal was not initialized. +.TP 5 \fBputwin\fP returns an error if the associated \fBfwrite\fP calls return an error. .RE diff --git a/man/man_db.renames b/man/man_db.renames index 5a09a035..ff91eecc 100644 --- a/man/man_db.renames +++ b/man/man_db.renames @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: man_db.renames,v 0.40 2008/01/19 18:28:50 tom Exp $ +# $Id: man_db.renames,v 0.41 2008/10/25 23:24:03 tom Exp $ # Manual-page renamings for the man_db program # # Files: @@ -68,6 +68,7 @@ curs_instr.3x instr.3ncurses curs_inwstr.3x inwstr.3ncurses curs_kernel.3x kernel.3ncurses curs_legacy.3x legacy.3ncurses +curs_memleaks.3x memleaks.3ncurses curs_mouse.3x mouse.3ncurses curs_move.3x move.3ncurses curs_opaque.3x opaque.3ncurses diff --git a/man/ncurses.3x b/man/ncurses.3x index f3c69324..703a239a 100644 --- a/man/ncurses.3x +++ b/man/ncurses.3x @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: ncurses.3x,v 1.91 2008/10/11 20:43:11 tom Exp $ +.\" $Id: ncurses.3x,v 1.92 2008/10/25 23:31:45 tom Exp $ .hy 0 .TH ncurses 3X "" .ds n 5 @@ -293,6 +293,8 @@ l l . = COLOR_PAIR/\fBcurs_color\fR(3X) PAIR_NUMBER/\fBcurs_attr\fR(3X) +_nc_free_and_exit/\fBcurs_memleaks\fR(3X)* +_nc_freeall/\fBcurs_memleaks\fR(3X)* _nc_tracebits/\fBcurs_trace\fR(3X)* _traceattr/\fBcurs_trace\fR(3X)* _traceattr2/\fBcurs_trace\fR(3X)*