-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1459 2009/11/07 22:13:22 tom Exp $
+-- $Id: NEWS,v 1.1462 2009/11/14 22:32:45 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20091114
+ + updated man/curs_trace.3x
+ + limit hashing for termcap-names to 2-characters (Ubuntu #481740).
+ + change a variable name in lib_newwin.c to make it clearer which
+ value is being freed on error (patch by Nicholas Marriott).
+
20091107
+ improve test/ncurses.c color-cycling test by reusing attribute-
and color-cycling logic from the video-attributes screen.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.730 2009/11/07 20:22:10 tom Exp $
+# $Id: dist.mk,v 1.731 2009/11/14 00:58:56 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
-NCURSES_PATCH = 20091107
+NCURSES_PATCH = 20091114
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
.\"***************************************************************************
-.\" Copyright (c) 2000-2005,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 2000-2007,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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_trace.3x,v 1.8 2007/02/24 17:33:49 tom Exp $
+.\" $Id: curs_trace.3x,v 1.9 2009/11/14 22:32:19 tom Exp $
.TH curs_trace 3X ""
.na
.hy 0
\fB_traceattr\fR,
\fB_traceattr2\fR,
\fB_nc_tracebits\fR,
+\fB_tracecchar_t\fR,
+\fB_tracecchar_t2\fR,
\fB_tracechar\fR,
\fB_tracechtype\fR,
\fB_tracechtype2\fR,
.br
\fBchar *_nc_tracebits(void);\fR
.br
-\fBchar *_tracechar(int);\fR
+\fBchar * _tracecchar_t (const cchar_t *string);\fR
+.br
+\fBchar * _tracecchar_t2 (int buffer, const cchar_t *string);\fR
+.br
+\fBchar *_tracechar(int ch);\fR
.br
\fBchar *_tracechtype(chtype ch);\fR
.br
These functions are normally available only with the debugging library
\fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
profile) by defining the symbol \fBTRACE\fR.
+Additionally, some functions are only available with the wide-character
+configuration of the libraries.
.PP
The principal parts of this interface are the \fBtrace\fR routine which
selectively enables different tracing features, and the \fB_tracef\fR
Some tracing features are enabled whenever the \fBtrace\fR parameter
is nonzero. Some features overlap.
The specific names are used as a guideline.
+.PP
+These functions check the \fBNCURSES_TRACE\fP environment variable,
+to set the tracing feature as if \fBtrace\fP was called:
+.RS
+filter,
+initscr,
+new_prescr,
+newterm,
+nofilter,
+ripoffline,
+setupterm,
+slk_init,
+tgetent
+.RE
+
.SH RETURN VALUE
Routines which return a value are designed to be used as parameters
to the \fB_tracef\fR routine.
#include <curses.priv.h>
#include <stddef.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.64 2009/11/07 16:27:05 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.65 2009/11/14 01:12:48 Nicholas.Marriott Exp $")
#define window_is(name) ((sp)->_##name == win)
win = &(wp->win);
if ((win->_line = typeCalloc(struct ldat, ((unsigned) num_lines))) == 0) {
- free(win);
+ free(wp);
returnWin(0);
}
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKcaptab.sh,v 1.10 2009/08/08 17:19:25 tom Exp $
+# $Id: MKcaptab.sh,v 1.12 2009/11/14 22:09:55 tom Exp $
AWK=${1-awk}
OPT1=${2-0}
OPT2=${3-tinfo/MKcaptab.awk}
./make_hash 1 info $OPT1 <$DATA
./make_hash 3 cap $OPT1 <$DATA
-$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA
+$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA
$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias <$DATA
}
static HashValue
-hash_function(const char *string)
+info_hash(const char *string)
{
long sum = 0;
return (HashValue) (sum % HASHTABSIZE);
}
+#define TCAP_LEN 2 /* only 1- or 2-character names are used */
+
+static HashValue
+tcap_hash(const char *string)
+{
+ char temp[TCAP_LEN + 1];
+ int limit = 0;
+
+ while (*string) {
+ temp[limit++] = *string++;
+ if (limit >= TCAP_LEN)
+ break;
+ }
+ temp[limit] = '\0';
+ return info_hash(temp);
+}
+
static int
-compare_cap_names(const char *a, const char *b)
+compare_tcap_names(const char *a, const char *b)
{
- return !strncmp(a, b, 2);
+ return !strncmp(a, b, TCAP_LEN);
}
static int
}
static const HashData hash_data[2] = {
- { HASHTABSIZE, _nc_info_hash_table, hash_function, compare_info_names },
- { HASHTABSIZE, _nc_cap_hash_table, hash_function, compare_cap_names }
+ { HASHTABSIZE, _nc_info_hash_table, info_hash, compare_info_names },
+ { HASHTABSIZE, _nc_cap_hash_table, tcap_hash, compare_tcap_names }
};
NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool termcap)