mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-12-21 07:39:06 +08:00
ncurses 5.9 - patch 20111008
+ moved static data from db_iterator.c to lib_data.c + modify db_iterator.c for memory-leak checking, fix one leak. + modify misc/gen-pkgconfig.in to use Requires.private for the parts of ncurses rather than Requires, as well as Libs.private for the other library dependencies (prompted by Debian #644728).
This commit is contained in:
parent
af4c589f0c
commit
44a4147009
9
NEWS
9
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.1795 2011/09/26 23:48:17 tom Exp $
|
||||
-- $Id: NEWS,v 1.1798 2011/10/08 21:06:49 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,13 @@ 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.
|
||||
|
||||
20111008
|
||||
+ moved static data from db_iterator.c to lib_data.c
|
||||
+ modify db_iterator.c for memory-leak checking, fix one leak.
|
||||
+ modify misc/gen-pkgconfig.in to use Requires.private for the parts
|
||||
of ncurses rather than Requires, as well as Libs.private for the
|
||||
other library dependencies (prompted by Debian #644728).
|
||||
|
||||
20111001
|
||||
+ modify tic "-K" option to only set the strict-flag rather than force
|
||||
source-output. That allows the same flag to control the parser for
|
||||
|
4
dist.mk
4
dist.mk
@ -25,7 +25,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.837 2011/09/25 12:41:00 tom Exp $
|
||||
# $Id: dist.mk,v 1.838 2011/10/08 15:25:29 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 = 9
|
||||
NCURSES_PATCH = 20111001
|
||||
NCURSES_PATCH = 20111008
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -32,7 +32,7 @@
|
||||
* and: Thomas E. Dickey 1998-on *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: term_entry.h,v 1.39 2011/06/26 09:31:32 tom Exp $ */
|
||||
/* $Id: term_entry.h,v 1.40 2011/10/08 21:00:41 tom Exp $ */
|
||||
|
||||
/*
|
||||
* term_entry.h -- interface to entry-manipulation code
|
||||
@ -47,6 +47,24 @@ extern "C" {
|
||||
|
||||
#include <term.h>
|
||||
|
||||
/* db_iterator.c */
|
||||
typedef enum {
|
||||
dbdTIC = 0,
|
||||
#if USE_DATABASE
|
||||
dbdEnvOnce,
|
||||
dbdHome,
|
||||
dbdEnvList,
|
||||
dbdCfgList,
|
||||
dbdCfgOnce,
|
||||
#endif
|
||||
#if USE_TERMCAP
|
||||
dbdEnvOnce2,
|
||||
dbdEnvList2,
|
||||
dbdCfgList2,
|
||||
#endif
|
||||
dbdLAST
|
||||
} DBDIRS;
|
||||
|
||||
#define MAX_USES 32
|
||||
#define MAX_CROSSLINKS 16
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id: tic.h,v 1.66 2011/07/30 21:28:43 tom Exp $
|
||||
* $Id: tic.h,v 1.67 2011/10/08 21:00:50 tom Exp $
|
||||
* tic.h - Global variables and structures for the terminfo
|
||||
* compiler.
|
||||
*/
|
||||
@ -315,23 +315,6 @@ extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent *
|
||||
extern const char * _nc_progname;
|
||||
|
||||
/* db_iterator.c */
|
||||
typedef enum {
|
||||
dbdTIC = 0,
|
||||
#if USE_DATABASE
|
||||
dbdEnvOnce,
|
||||
dbdHome,
|
||||
dbdEnvList,
|
||||
dbdCfgList,
|
||||
dbdCfgOnce,
|
||||
#endif
|
||||
#if USE_TERMCAP
|
||||
dbdEnvOnce2,
|
||||
dbdEnvList2,
|
||||
dbdCfgList2,
|
||||
#endif
|
||||
dbdLAST
|
||||
} DBDIRS;
|
||||
|
||||
extern NCURSES_EXPORT(const char *) _nc_next_db(DBDIRS *, int *);
|
||||
extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *);
|
||||
extern NCURSES_EXPORT(void) _nc_first_db(DBDIRS *, int *);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!@SHELL@
|
||||
# $Id: gen-pkgconfig.in,v 1.8 2010/02/06 22:12:07 Miroslav.Lichvar Exp $
|
||||
# $Id: gen-pkgconfig.in,v 1.10 2011/10/08 19:20:15 tom Exp $
|
||||
##############################################################################
|
||||
# Copyright (c) 2009,2010 Free Software Foundation, Inc. #
|
||||
# Copyright (c) 2009-2010,2011 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"), #
|
||||
@ -28,7 +28,7 @@
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
#
|
||||
# Author: Thomas E. Dickey, 2009
|
||||
# Author: Thomas E. Dickey
|
||||
#
|
||||
# The complete configure script for ncurses is the ncurses5-config (or similar
|
||||
# name, depending on the flavor, e.g., ncursesw5-config, ncurses6-config, etc).
|
||||
@ -68,6 +68,18 @@ if test $TINFO_NAME = $LIB_NAME ; then
|
||||
SUB_LIBRARY_REQ=
|
||||
fi
|
||||
|
||||
if test "$includedir" = "/usr/include" ; then
|
||||
CFLAGS=
|
||||
else
|
||||
CFLAGS="-I\${includedir}"
|
||||
fi
|
||||
|
||||
if test "$libdir" = "/usr/lib" ; then
|
||||
LDFLAGS=
|
||||
else
|
||||
LDFLAGS="-L\${libdir}"
|
||||
fi
|
||||
|
||||
for lib in ../lib/*
|
||||
do
|
||||
name=`basename $lib`
|
||||
@ -86,40 +98,31 @@ do
|
||||
name=`echo "$name" | sed -e 's/^lib//' -e 's/\..*$//'`
|
||||
|
||||
desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
|
||||
reqs=
|
||||
|
||||
if test $name = $MAIN_LIBRARY ; then
|
||||
reqs=$SUB_LIBRARY_REQ
|
||||
desc="$desc library"
|
||||
elif test $name = $SUB_LIBRARY ; then
|
||||
reqs=
|
||||
desc="$desc terminal interface library"
|
||||
elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
|
||||
reqs="$PANEL_LIBRARY $MENU_LIBRARY $FORM_LIBRARY $MAIN_LIBRARY $SUB_LIBRARY_REQ"
|
||||
reqs="$PANEL_LIBRARY, $MENU_LIBRARY, $FORM_LIBRARY, $MAIN_LIBRARY"
|
||||
desc="$desc add-on library"
|
||||
else
|
||||
reqs="$MAIN_LIBRARY $SUB_LIBRARY_REQ"
|
||||
reqs="$MAIN_LIBRARY"
|
||||
desc="$desc add-on library"
|
||||
fi
|
||||
|
||||
if test "$includedir" = "/usr/include" ; then
|
||||
cflags=
|
||||
else
|
||||
cflags="-I\${includedir}"
|
||||
fi
|
||||
|
||||
if test "$libdir" = "/usr/lib" ; then
|
||||
libs=
|
||||
else
|
||||
libs="-L\${libdir}"
|
||||
fi
|
||||
libs="$libs -l$name"
|
||||
|
||||
# add dependencies that pkg-config cannot guess about
|
||||
if test -z "$reqs" ; then
|
||||
libs="$libs @LIBS@"
|
||||
if test $name != $SUB_LIBRARY ; then
|
||||
if test $name != $TINFO_NAME ; then
|
||||
test -n "$reqs" && reqs="$reqs, "
|
||||
reqs="${reqs}${SUB_LIBRARY}"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "** creating ${name}.pc"
|
||||
cat >${name}.pc <<EOF
|
||||
# vile:makemode
|
||||
|
||||
prefix=$show_prefix
|
||||
exec_prefix=$show_exec_prefix
|
||||
libdir=$show_libdir
|
||||
@ -130,10 +133,13 @@ version=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
|
||||
Name: $name
|
||||
Description: $desc
|
||||
Version: \${version}
|
||||
Requires: $reqs
|
||||
Libs: $libs
|
||||
Cflags: $cflags
|
||||
URL: http://invisible-island.net/ncurses
|
||||
Requires.private: $reqs
|
||||
Libs: $LDFLAGS -l$name
|
||||
Libs.private: @LIBS@
|
||||
Cflags: $CFLAGS
|
||||
EOF
|
||||
# pr -f ${name}.pc
|
||||
|
||||
#pr -f ${name}.pc
|
||||
done
|
||||
# vile:shmode
|
||||
|
@ -34,7 +34,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id: curses.priv.h,v 1.483 2011/09/17 19:08:20 tom Exp $
|
||||
* $Id: curses.priv.h,v 1.485 2011/10/08 21:00:56 tom Exp $
|
||||
*
|
||||
* curses.priv.h
|
||||
*
|
||||
@ -784,6 +784,11 @@ struct DriverTCB; /* Terminal Control Block forward declaration */
|
||||
#define INIT_TERM_DRIVER() /* nothing */
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
char *value;
|
||||
} ITERATOR_VARS;
|
||||
|
||||
/*
|
||||
* Global data which is not specific to a screen.
|
||||
*/
|
||||
@ -816,6 +821,12 @@ typedef struct {
|
||||
int tgetent_index;
|
||||
long tgetent_sequence;
|
||||
|
||||
char *dbd_blob; /* string-heap for dbd_list[] */
|
||||
char **dbd_list; /* distinct places to look for data */
|
||||
int dbd_size; /* length of dbd_list[] */
|
||||
time_t dbd_time; /* cache last updated */
|
||||
ITERATOR_VARS dbd_vars[dbdLAST];
|
||||
|
||||
#ifndef USE_SP_WINDOWLIST
|
||||
WINDOWLIST *_nc_windowlist;
|
||||
#define WindowList(sp) _nc_globals._nc_windowlist
|
||||
@ -1945,6 +1956,7 @@ extern NCURSES_EXPORT(void) _nc_captoinfo_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_codes_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_comp_captab_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_comp_scan_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_db_iterator_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_keyname_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_names_leaks(void);
|
||||
extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void);
|
||||
|
@ -43,23 +43,16 @@
|
||||
#include <hashed_db.h>
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: db_iterator.c,v 1.18 2011/09/26 09:52:00 tom Exp $")
|
||||
MODULE_ID("$Id: db_iterator.c,v 1.20 2011/10/08 20:55:38 tom Exp $")
|
||||
|
||||
#define HaveTicDirectory _nc_globals.have_tic_directory
|
||||
#define KeepTicDirectory _nc_globals.keep_tic_directory
|
||||
#define TicDirectory _nc_globals.tic_directory
|
||||
|
||||
/*
|
||||
* FIXME: need a no-leaks entrypoint.
|
||||
*/
|
||||
static char *my_blob; /* string-heap for my_list[] */
|
||||
static char **my_list; /* distinct places to look for data */
|
||||
static int my_size; /* length of my_list[] */
|
||||
static time_t my_time; /* cache last updated */
|
||||
static struct {
|
||||
const char *name;
|
||||
char *value;
|
||||
} my_vars[dbdLAST];
|
||||
#define my_blob _nc_globals.dbd_blob
|
||||
#define my_list _nc_globals.dbd_list
|
||||
#define my_size _nc_globals.dbd_size
|
||||
#define my_time _nc_globals.dbd_time
|
||||
#define my_vars _nc_globals.dbd_vars
|
||||
|
||||
static void
|
||||
add_to_blob(const char *text)
|
||||
@ -377,6 +370,18 @@ _nc_first_db(DBDIRS * state, int *offset)
|
||||
} else {
|
||||
FreeAndNull(my_blob);
|
||||
}
|
||||
free(my_stat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if NO_LEAKS
|
||||
void
|
||||
_nc_db_iterator_leaks(void)
|
||||
{
|
||||
if (my_blob != 0)
|
||||
FreeAndNull(my_blob);
|
||||
if (my_list != 0)
|
||||
FreeAndNull(my_list);
|
||||
}
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: entries.c,v 1.17 2010/01/23 17:57:43 tom Exp $")
|
||||
MODULE_ID("$Id: entries.c,v 1.18 2011/10/08 20:32:26 tom Exp $")
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -128,6 +128,7 @@ _nc_leaks_tinfo(void)
|
||||
_nc_free_entries(_nc_head);
|
||||
_nc_get_type(0);
|
||||
_nc_first_name(0);
|
||||
_nc_db_iterator_leaks();
|
||||
_nc_keyname_leaks();
|
||||
#if BROKEN_LINKER || USE_REENTRANT
|
||||
_nc_names_leaks();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2010,2011 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 *
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
#include <curses.priv.h>
|
||||
|
||||
MODULE_ID("$Id: lib_data.c,v 1.62 2011/09/26 09:48:08 tom Exp $")
|
||||
MODULE_ID("$Id: lib_data.c,v 1.63 2011/10/08 21:03:29 tom Exp $")
|
||||
|
||||
/*
|
||||
* OS/2's native linker complains if we don't initialize public data when
|
||||
@ -142,6 +142,12 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
|
||||
0, /* tgetent_index */
|
||||
0, /* tgetent_sequence */
|
||||
|
||||
0, /* dbd_blob */
|
||||
0, /* dbd_list */
|
||||
0, /* dbd_size */
|
||||
0, /* dbd_time */
|
||||
{ { 0, 0 } }, /* dbd_vars */
|
||||
|
||||
#ifndef USE_SP_WINDOWLIST
|
||||
0, /* _nc_windowlist */
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2010,2011 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 *
|
||||
@ -39,12 +39,13 @@
|
||||
|
||||
#include <build.priv.h>
|
||||
|
||||
#include <term_entry.h>
|
||||
#include <tic.h>
|
||||
#include <hashsize.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
MODULE_ID("$Id: make_hash.c,v 1.3 2010/05/22 18:02:50 tom Exp $")
|
||||
MODULE_ID("$Id: make_hash.c,v 1.4 2011/10/08 21:11:54 tom Exp $")
|
||||
|
||||
/*
|
||||
* _nc_make_hash_table()
|
||||
|
Loading…
Reference in New Issue
Block a user