ncurses 5.6 - patch 20071117

+ modify the support for filesystems which do not support mixed-case to
  generate 2-character (hexadecimal) codes for the lower-level of the
  filesystem terminfo database (request by Michail Vidiassov).
+ add configure option --enable-mixed-case, to allow overriding the
  configure script's check if the filesystem supports mixed-case
  filenames.
+ add wresize() to C++ binding (request by Chris Lee).
+ define NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS in curses.h to make
  it simpler to tell if the extended functions and/or colors are
  declared.
This commit is contained in:
Thomas E. Dickey 2007-11-18 02:09:05 +00:00
parent b17ff3673e
commit 40df80d8d3
12 changed files with 1705 additions and 1651 deletions

View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.119 2007/07/28 19:56:35 tom Exp $
-- $Id: INSTALL,v 1.120 2007/11/17 22:05:11 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -498,6 +498,12 @@ SUMMARY OF CONFIGURE OPTIONS:
may not be accurate, or that your stty settings have disabled the use
of tabs.
--enable-mixed-case
Controls whether the filesystem on which the terminfo database resides
supports mixed-case filenames (normal for UNIX, but not on other
systems). If you do not specify this option, the configure script
checks the current filesystem.
--enable-no-padding
Compile-in support for the $NCURSES_NO_PADDING environment variable,
which allows you to suppress the effect of non-mandatory padding in

14
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1181 2007/11/03 21:08:20 tom Exp $
-- $Id: NEWS,v 1.1182 2007/11/17 23:43:07 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,18 @@ 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.
20071117
+ modify the support for filesystems which do not support mixed-case to
generate 2-character (hexadecimal) codes for the lower-level of the
filesystem terminfo database (request by Michail Vidiassov).
+ add configure option --enable-mixed-case, to allow overriding the
configure script's check if the filesystem supports mixed-case
filenames.
+ add wresize() to C++ binding (request by Chris Lee).
+ define NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS in curses.h to make
it simpler to tell if the extended functions and/or colors are
declared.
20071103
+ update memory-leak checks for changes to names.c and codes.c
+ correct acsc strings in h19, z100 (patch by Benjamin C W Sittler).

View File

@ -30,7 +30,7 @@
#ifndef NCURSES_CURSESW_H_incl
#define NCURSES_CURSESW_H_incl 1
// $Id: cursesw.h,v 1.44 2007/04/07 18:42:04 tom Exp $
// $Id: cursesw.h,v 1.45 2007/11/17 21:42:06 tom Exp $
#include <etip.h>
@ -1214,6 +1214,14 @@ public:
// dmaxrow,dmaxcol with the rectangle in this window beginning at
// sminrow,smincol.
// -------------------------------------------------------------------------
// Extended functions
// -------------------------------------------------------------------------
#ifdef NCURSES_EXT_FUNCS
int wresize(NCursesWindow& win, int newLines, int newColumns) {
return ::wresize(win.w, newLines, newColumns); }
#endif
// -------------------------------------------------------------------------
// Mouse related
// -------------------------------------------------------------------------

3235
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.425 2007/09/01 17:00:08 tom Exp $
dnl $Id: configure.in,v 1.427 2007/11/18 00:52:38 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
AC_REVISION($Revision: 1.425 $)
AC_REVISION($Revision: 1.427 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -150,13 +150,28 @@ CF_PROG_INSTALL
CF_PROG_LINT
AC_PROG_LN_S
AC_SYS_LONG_FILE_NAMES
AC_MSG_CHECKING(if we should assume mixed-case filenames)
AC_ARG_ENABLE(mixed-case,
[ --enable-mixed-case tic should assume mixed-case filenames],
[enable_mixedcase=$enableval],
[enable_mixedcase=auto])
AC_MSG_RESULT($enable_mixedcase)
if test "$enable_mixedcase" = "auto" ; then
CF_MIXEDCASE_FILENAMES
else
cf_cv_mixedcase=$enable_mixedcase
if test "$enable_mixedcase" = "yes" ; then
AC_DEFINE(MIXEDCASE_FILENAMES)
fi
fi
# do this after mixed-case option (tags/TAGS is not as important as tic).
AC_PROG_MAKE_SET
CF_MAKE_TAGS
CF_MAKEFLAGS
AC_SYS_LONG_FILE_NAMES
CF_MIXEDCASE_FILENAMES
dnl These are standard among *NIX systems, but not when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, ':')
AC_CHECK_TOOL(LD, ld, ld)

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.615 2007/11/03 16:39:13 tom Exp $
# $Id: dist.mk,v 1.616 2007/11/17 20:57:47 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 = 20071103
NCURSES_PATCH = 20071117
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.178 2007/09/08 21:24:55 tom Exp $ */
/* $Id: curses.h.in,v 1.181 2007/11/18 00:32:03 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -350,6 +350,8 @@ typedef struct
attr_t attr;
wchar_t chars[CCHARW_MAX];
#if @NCURSES_EXT_COLORS@
#undef NCURSES_EXT_COLORS
#define NCURSES_EXT_COLORS @NCURSES_PATCH@
int ext_color; /* color pair, must be more than 16-bits */
#endif
}
@ -825,7 +827,10 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
/*
* These functions are extensions - not in X/Open Curses.
*/
#undef NCURSES_EXT_FUNCS
#if @NCURSES_EXT_FUNCS@
#undef NCURSES_EXT_FUNCS
#define NCURSES_EXT_FUNCS @NCURSES_PATCH@
typedef int (*NCURSES_CALLBACK)(WINDOW *, void *);
extern NCURSES_EXPORT(bool) is_term_resized (int, int);
extern NCURSES_EXPORT(char *) keybound (int, int);

View File

@ -34,7 +34,7 @@
/*
* $Id: curses.priv.h,v 1.348 2007/11/03 20:24:15 tom Exp $
* $Id: curses.priv.h,v 1.349 2007/11/17 23:33:18 tom Exp $
*
* curses.priv.h
*
@ -482,6 +482,17 @@ typedef struct {
size_t size;
} TRACEBUF;
/*
* The filesystem database normally uses a single-letter for the lower level
* of directories. Use a hexadecimal code for filesystems which do not
* preserve mixed-case names.
*/
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
#else
#define LEAF_FMT "%02x"
#endif
/*
* TRACEMSE_FMT is no longer than 80 columns, there are 5 numbers that
* could at most have 10 digits, and the mask contains no more than 32 bits

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
* Copyright (c) 1998-2006,2007 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 *
@ -32,12 +32,13 @@
#include <curses.priv.h>
#include <ctype.h>
#include <sys/stat.h>
#include <tic.h>
#include <nc_alloc.h>
MODULE_ID("$Id: access.c,v 1.12 2006/08/05 17:18:14 tom Exp $")
MODULE_ID("$Id: access.c,v 1.14 2007/11/18 00:57:53 tom Exp $")
#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
@ -45,14 +46,13 @@ NCURSES_EXPORT(char *)
_nc_rootname(char *path)
{
char *result = _nc_basename(path);
#if !defined(MIXEDCASE_FILENAMES) || defined(PROG_EXT)
#if !MIXEDCASE_FILENAMES || defined(PROG_EXT)
static char *temp;
char *s;
temp = strdup(result);
result = temp;
#if !defined(MIXEDCASE_FILENAMES)
int n;
#if !MIXEDCASE_FILENAMES
for (s = result; *s != '\0'; ++s) {
*s = LOWERCASE(*s);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
* Copyright (c) 1998-2006,2007 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 <tic.h>
#include <term_entry.h>
MODULE_ID("$Id: read_entry.c,v 1.99 2006/08/19 15:58:50 tom Exp $")
MODULE_ID("$Id: read_entry.c,v 1.100 2007/11/17 23:56:50 tom Exp $")
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
@ -409,7 +409,7 @@ _nc_read_tic_entry(char *filename,
unsigned need = 4 + strlen(path) + strlen(name);
if (need <= limit) {
(void) sprintf(filename, "%s/%c/%s", path, *name, name);
(void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
result = _nc_read_file_entry(filename, tp);
}
}

View File

@ -54,7 +54,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
MODULE_ID("$Id: write_entry.c,v 1.69 2007/05/12 19:04:13 tom Exp $")
MODULE_ID("$Id: write_entry.c,v 1.70 2007/11/17 23:38:28 tom Exp $")
static int total_written;
@ -97,17 +97,16 @@ check_writeable(int code)
static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
static bool verified[sizeof(dirnames)];
char dir[2];
char dir[sizeof(LEAF_FMT)];
char *s = 0;
if (code == 0 || (s = strchr(dirnames, code)) == 0)
_nc_err_abort("Illegal terminfo subdirectory \"%c\"", code);
_nc_err_abort("Illegal terminfo subdirectory \"" LEAF_FMT "\"", code);
if (verified[s - dirnames])
return;
dir[0] = code;
dir[1] = '\0';
sprintf(dir, LEAF_FMT, code);
if (make_db_root(dir) < 0) {
_nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir);
}
@ -358,7 +357,7 @@ _nc_write_entry(TERMTYPE *const tp)
if (strlen(first_name) > sizeof(filename) - 3)
_nc_warning("terminal name too long.");
sprintf(filename, "%c/%s", first_name[0], first_name);
sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
/*
* Has this primary name been written since the first call to
@ -399,7 +398,7 @@ _nc_write_entry(TERMTYPE *const tp)
}
check_writeable(ptr[0]);
sprintf(linkname, "%c/%s", ptr[0], ptr);
sprintf(linkname, LEAF_FMT "/%s", ptr[0], ptr);
if (strcmp(filename, linkname) == 0) {
_nc_warning("self-synonym ignored");

View File

@ -42,7 +42,7 @@
#include <dump_entry.h>
MODULE_ID("$Id: infocmp.c,v 1.93 2007/08/12 13:53:44 tom Exp $")
MODULE_ID("$Id: infocmp.c,v 1.94 2007/11/17 23:34:26 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@ -1492,9 +1492,14 @@ main(int argc, char *argv[])
if (directory) {
#if USE_DATABASE
(void) sprintf(tfile[termcount], "%s/%c/%s",
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
#else
#define LEAF_FMT "%02x"
#endif
(void) sprintf(tfile[termcount], "%s/" LEAF_FMT "/%s",
directory,
*argv[optind], argv[optind]);
UChar(*argv[optind]), argv[optind]);
if (itrace)
(void) fprintf(stderr,
"%s: reading entry %s from file %s\n",