summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
49e6baa)
+ correct layout of working window used to extract data in
wide-character configured by set_field_buffer (patch by Rafael
Garrido Fernandez)
+ improve some limit-checks related to filename length in reading and
writing terminfo entries.
+ ensure that filename is always filled in when attempting to read
a terminfo entry, so that infocmp can report the filename (patch
by Nicholas Marriott).
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1468 2009/11/28 22:51:06 tom Exp $
+-- $Id: NEWS,v 1.1470 2009/12/05 22:07:39 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
-------------------------------------------------------------------------------
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.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20091205
+ + correct layout of working window used to extract data in
+ wide-character configured by set_field_buffer (patch by Rafael
+ Garrido Fernandez)
+ + improve some limit-checks related to filename length in reading and
+ writing terminfo entries.
+ + ensure that filename is always filled in when attempting to read
+ a terminfo entry, so that infocmp can report the filename (patch
+ by Nicholas Marriott).
+
20091128
+ modify mk-1st.awk to allow tinfo library to be built when term-driver
is enabled.
20091128
+ modify mk-1st.awk to allow tinfo library to be built when term-driver
is enabled.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.733 2009/11/28 17:54:26 tom Exp $
+# $Id: dist.mk,v 1.734 2009/12/05 18:20:30 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# 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
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
-NCURSES_PATCH = 20091128
+NCURSES_PATCH = 20091205
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-MODULE_ID("$Id: frm_driver.c,v 1.94 2009/11/07 19:54:03 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.95 2009/12/05 21:45:58 Rafael.Garrido.Fernandez Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
* and other special cases that we really do not want to handle here.
*/
#if NCURSES_EXT_FUNCS
* and other special cases that we really do not want to handle here.
*/
#if NCURSES_EXT_FUNCS
- if (wresize(field->working, field->drows, field->dcols) == ERR)
+ if (wresize(field->working, 1, Buffer_Length(field) + 1) == ERR)
#endif
{
delwin(field->working);
#endif
{
delwin(field->working);
- field->working = newpad(field->drows, field->dcols);
+ field->working = newpad(1, Buffer_Length(field) + 1);
}
len = Buffer_Length(field);
wclear(field->working);
}
len = Buffer_Length(field);
wclear(field->working);
{
for (i = 0; i < (unsigned)field->drows; ++i)
{
{
for (i = 0; i < (unsigned)field->drows; ++i)
{
- mvwin_wchnstr(field->working, i, 0,
+ mvwin_wchnstr(field->working, 0, i * field->dcols,
widevalue + (i * field->dcols),
field->dcols);
}
widevalue + (i * field->dcols),
field->dcols);
}
- * $Id: curses.priv.h,v 1.444 2009/11/28 22:43:12 tom Exp $
+ * $Id: curses.priv.h,v 1.445 2009/12/05 21:20:51 tom Exp $
*/
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
*/
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
#else
#define LEAF_FMT "%02x"
#else
#define LEAF_FMT "%02x"
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <tic.h>
#include <term_entry.h>
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: read_entry.c,v 1.102 2008/08/03 19:33:04 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.105 2009/12/06 01:22:26 tom Exp $")
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
if (need) {
if (ext_str_count >= (MAX_ENTRY_SIZE * 2))
if (need) {
if (ext_str_count >= (MAX_ENTRY_SIZE * 2))
if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0)
return (TGETENT_NO);
TR(TRACE_DATABASE,
if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0)
return (TGETENT_NO);
TR(TRACE_DATABASE,
/*
* If we are looking in a directory, assume the entry is a file under that,
* according to the normal rules.
/*
* If we are looking in a directory, assume the entry is a file under that,
* according to the normal rules.
- *
- * FIXME - add caseless-filename fixup.
- if (_nc_is_dir_path(path)) {
- unsigned need = 4 + strlen(path) + strlen(name);
+ unsigned need = LEAF_LEN + 3 + strlen(path) + strlen(name);
+ if (need <= limit)
+ (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
- if (need <= limit) {
- (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
- result = _nc_read_file_entry(filename, tp);
- }
- }
+ if (_nc_is_dir_path(path))
+ result = _nc_read_file_entry(filename, tp);
#if USE_HASHED_DB
else {
static const char suffix[] = DBM_SUFFIX;
DB *capdbp;
unsigned lens = sizeof(suffix) - 1;
unsigned size = strlen(path);
#if USE_HASHED_DB
else {
static const char suffix[] = DBM_SUFFIX;
DB *capdbp;
unsigned lens = sizeof(suffix) - 1;
unsigned size = strlen(path);
- unsigned need = lens + size;
+ unsigned test = lens + size;
if (size >= lens
&& !strcmp(path + size - lens, suffix))
(void) strcpy(filename, path);
if (size >= lens
&& !strcmp(path + size - lens, suffix))
(void) strcpy(filename, path);
+ sprintf(filename, "%.*s", PATH_MAX - 1, name);
if (strlen(name) == 0
|| strcmp(name, ".") == 0
|| strcmp(name, "..") == 0
if (strlen(name) == 0
|| strcmp(name, ".") == 0
|| strcmp(name, "..") == 0
#define TRACE_OUT(p) /*nothing */
#endif
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.74 2009/09/19 20:30:48 Daniel.Jacobowitz Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.75 2009/12/05 21:25:01 tom Exp $")
static int total_written;
static int total_written;
if (_nc_is_dir_path(dst)) {
rc = -1;
} else {
if (_nc_is_dir_path(dst)) {
rc = -1;
} else {
+ static const char suffix[] = DBM_SUFFIX;
unsigned have = strlen(dst);
unsigned have = strlen(dst);
- if (have > 3 && strcmp(dst + have - 3, DBM_SUFFIX)) {
- if (have + 3 <= limit)
- strcat(dst, DBM_SUFFIX);
+ unsigned need = strlen(suffix);
+ if (have > need && strcmp(dst + have - need, suffix)) {
+ if (have + need <= limit)
+ strcat(dst, suffix);
- if (strlen(first_name) >= sizeof(filename) - 3)
+ if (strlen(first_name) >= sizeof(filename) - (2 + LEAF_LEN))
_nc_warning("terminal name too long.");
sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
_nc_warning("terminal name too long.");
sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
if (*other_names != '\0')
*(other_names++) = '\0';
if (*other_names != '\0')
*(other_names++) = '\0';
- if (strlen(ptr) > sizeof(linkname) - 3) {
+ if (strlen(ptr) > sizeof(linkname) - (2 + LEAF_LEN)) {
_nc_warning("terminal alias %s too long.", ptr);
continue;
}
_nc_warning("terminal alias %s too long.", ptr);
continue;
}
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
-MODULE_ID("$Id: infocmp.c,v 1.103 2008/08/16 22:04:56 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.104 2009/12/05 21:10:31 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
#define L_CURL "{"
#define R_CURL "}"
*
***************************************************************************/
*
***************************************************************************/
+#if NO_LEAKS
+#define MAIN_LEAKS() \
+ free(myargv); \
+ free(tfile); \
+ free(tname)
+#else
+#define MAIN_LEAKS() /* nothing */
+#endif
+
int
main(int argc, char *argv[])
{
int
main(int argc, char *argv[])
{
#else
(void) fprintf(stderr, "%s: terminfo files not supported\n",
_nc_progname);
#else
(void) fprintf(stderr, "%s: terminfo files not supported\n",
_nc_progname);
ExitProgram(EXIT_FAILURE);
#endif
} else {
ExitProgram(EXIT_FAILURE);
#endif
} else {
"%s: couldn't open terminfo file %s.\n",
_nc_progname,
tfile[termcount]);
"%s: couldn't open terminfo file %s.\n",
_nc_progname,
tfile[termcount]);
ExitProgram(EXIT_FAILURE);
}
repair_acsc(&entries[termcount].tterm);
ExitProgram(EXIT_FAILURE);
}
repair_acsc(&entries[termcount].tterm);
else
file_comparison(argc - optind, argv + optind);
else
file_comparison(argc - optind, argv + optind);
-#if NO_LEAKS
- free(myargv);
- free(tfile);
- free(tname);
-#endif
ExitProgram(EXIT_SUCCESS);
}
ExitProgram(EXIT_SUCCESS);
}