snapshot of project "ncurses", label v5_9_20110514

This commit is contained in:
Thomas E. Dickey 2011-05-14 23:24:57 -04:00
parent 3b0651abaa
commit 36cb75a31f
17 changed files with 1583 additions and 1508 deletions

127
Ada95/aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey
dnl
dnl $Id: aclocal.m4,v 1.26 2011/05/07 15:35:16 tom Exp $
dnl $Id: aclocal.m4,v 1.27 2011/05/14 20:55:38 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -39,6 +39,31 @@ dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03
dnl ------------------
dnl Conditionally generate script according to whether we're using a given autoconf.
dnl
dnl $1 = version to compare against
dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
dnl $3 = code to use if AC_ACVERSION is older than $1.
define(CF_ACVERSION_CHECK,
[
ifdef([m4_version_compare],
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
[CF_ACVERSION_COMPARE(
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50
dnl --------------------
dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
dnl MAJOR2, MINOR2, TERNARY2,
dnl PRINTABLE2, not FOUND, FOUND)
define(CF_ACVERSION_COMPARE,
[ifelse(builtin([eval], [$2 < $5]), 1,
[ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
dnl -------------------
dnl Construct the list of include-options for the C programs in the Ada95
@ -1070,53 +1095,6 @@ AC_SUBST(cf_compile_generics)
AC_SUBST(cf_generic_objects)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
dnl --------------
dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it
dnl is noted that gnat may compile a tasking unit even for configurations which
dnl fail at runtime.
AC_DEFUN([CF_GNAT_SIGINT],[
AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
package ConfTest is
pragma Warnings (Off); -- the next pragma exists since 3.11p
pragma Unreserve_All_Interrupts;
pragma Warnings (On);
protected Process is
procedure Stop;
function Continue return Boolean;
pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
private
Done : Boolean := False;
end Process;
end ConfTest;],
[package body ConfTest is
protected body Process is
procedure Stop is
begin
Done := True;
end Stop;
function Continue return Boolean is
begin
return not Done;
end Continue;
end Process;
end ConfTest;],
[cf_cv_gnat_sigint=yes],
[cf_cv_gnat_sigint=no])])
if test $cf_cv_gnat_sigint = yes ; then
USE_GNAT_SIGINT=""
else
USE_GNAT_SIGINT="#"
fi
AC_SUBST(USE_GNAT_SIGINT)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
dnl --------------------
dnl Check if the gnat pragma "Unreferenced" works.
@ -1253,6 +1231,53 @@ AC_SUBST(USE_GNAT_PROJECTS)
AC_SUBST(USE_GNAT_LIBRARIES)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
dnl --------------
dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it
dnl is noted that gnat may compile a tasking unit even for configurations which
dnl fail at runtime.
AC_DEFUN([CF_GNAT_SIGINT],[
AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
package ConfTest is
pragma Warnings (Off); -- the next pragma exists since 3.11p
pragma Unreserve_All_Interrupts;
pragma Warnings (On);
protected Process is
procedure Stop;
function Continue return Boolean;
pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
private
Done : Boolean := False;
end Process;
end ConfTest;],
[package body ConfTest is
protected body Process is
procedure Stop is
begin
Done := True;
end Stop;
function Continue return Boolean is
begin
return not Done;
end Continue;
end Process;
end ConfTest;],
[cf_cv_gnat_sigint=yes],
[cf_cv_gnat_sigint=no])])
if test $cf_cv_gnat_sigint = yes ; then
USE_GNAT_SIGINT=""
else
USE_GNAT_SIGINT="#"
fi
AC_SUBST(USE_GNAT_SIGINT)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45
dnl ----------------
dnl Verify that a test program compiles/links with GNAT.
@ -2546,7 +2571,7 @@ case ".[$]$1" in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PKG_CONFIG version: 6 updated: 2011/04/17 06:36:21
dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
dnl -------------
dnl Check for the package-config program, unless disabled by command-line.
AC_DEFUN([CF_PKG_CONFIG],
@ -2563,7 +2588,9 @@ no) #(vi
PKG_CONFIG=none
;;
yes) #(vi
AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
CF_ACVERSION_CHECK(2.52,
[AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
[AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
;;
*)
PKG_CONFIG=$withval

1543
Ada95/configure vendored

File diff suppressed because it is too large Load Diff

12
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1699 2011/05/07 19:51:09 tom Exp $
-- $Id: NEWS,v 1.1703 2011/05/14 21:49:54 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,16 @@ 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.
20110514
+ compiler-warning fixes in panel and progs.
+ modify CF_PKG_CONFIG macro, from changes to tin -TD
+ modify CF_CURSES_FUNCS configure macro, used in test directory
configure script:
+ work around (non-optimizer) bug in gcc 4.2.1 which caused
test-expression to be omitted from executable.
+ force the linker to see a link-time expression of a symbol, to
help work around weak-symbol issues.
20110507
+ update discussion of MKfallback.sh script in INSTALL; normally the
script is used automatically via the configured makefiles. However

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.815 2011/05/07 14:12:36 tom Exp $
# $Id: dist.mk,v 1.816 2011/05/14 17:22:21 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 = 20110507
NCURSES_PATCH = 20110514
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -34,7 +34,7 @@
****************************************************************************/
/*
* $Id: curses.priv.h,v 1.477 2011/04/23 18:05:15 tom Exp $
* $Id: curses.priv.h,v 1.478 2011/05/14 17:36:15 tom Exp $
*
* curses.priv.h
*
@ -1417,25 +1417,25 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define CHANGED_CELL(line,col) \
if (line->firstchar == _NOCHANGE) \
line->firstchar = line->lastchar = (NCURSES_SIZE_T) col; \
line->firstchar = line->lastchar = (NCURSES_SIZE_T) (col); \
else if ((col) < line->firstchar) \
line->firstchar = (NCURSES_SIZE_T) col; \
line->firstchar = (NCURSES_SIZE_T) (col); \
else if ((col) > line->lastchar) \
line->lastchar = (NCURSES_SIZE_T) col
line->lastchar = (NCURSES_SIZE_T) (col)
#define CHANGED_RANGE(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
line->firstchar = (NCURSES_SIZE_T) start; \
line->firstchar = (NCURSES_SIZE_T) (start); \
if (line->lastchar == _NOCHANGE \
|| line->lastchar < (end)) \
line->lastchar = (NCURSES_SIZE_T) end
line->lastchar = (NCURSES_SIZE_T) (end)
#define CHANGED_TO_EOL(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
line->firstchar = (NCURSES_SIZE_T) start; \
line->lastchar = (NCURSES_SIZE_T) end
line->firstchar = (NCURSES_SIZE_T) (start); \
line->lastchar = (NCURSES_SIZE_T) (end)
#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2008,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,7 +39,7 @@
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
MODULE_ID("$Id: dump_entry.c,v 1.89 2010/05/01 22:04:08 tom Exp $")
MODULE_ID("$Id: dump_entry.c,v 1.91 2011/05/14 22:39:21 tom Exp $")
#define INDENT 8
#define DISCARD(string) string = ABSENT_STRING
@ -172,7 +172,11 @@ nametrans(const char *name)
}
void
dump_init(const char *version, int mode, int sort, int twidth, int traceval,
dump_init(const char *version,
int mode,
int sort,
int twidth,
unsigned traceval,
bool formatted)
/* set up for entry display */
{
@ -393,8 +397,8 @@ force_wrap(void)
static void
wrap_concat(const char *src)
{
unsigned need = strlen(src);
unsigned want = strlen(separator) + need;
size_t need = strlen(src);
size_t want = strlen(separator) + need;
if (column > INDENT
&& column + (int) want > width) {
@ -600,7 +604,7 @@ fmt_entry(TERMTYPE *tterm,
for_each_boolean(j, tterm) {
i = BoolIndirect(j);
name = ExtBoolname(tterm, i, bool_names);
name = ExtBoolname(tterm, (int) i, bool_names);
assert(strlen(name) < sizeof(buffer) - EXTRA_CAP);
if (!version_filter(BOOLEAN, i))
@ -624,7 +628,7 @@ fmt_entry(TERMTYPE *tterm,
for_each_number(j, tterm) {
i = NumIndirect(j);
name = ExtNumname(tterm, i, num_names);
name = ExtNumname(tterm, (int) i, num_names);
assert(strlen(name) < sizeof(buffer) - EXTRA_CAP);
if (!version_filter(NUMBER, i))
@ -670,7 +674,7 @@ fmt_entry(TERMTYPE *tterm,
for_each_string(j, tterm) {
i = StrIndirect(j);
name = ExtStrname(tterm, i, str_names);
name = ExtStrname(tterm, (int) i, str_names);
assert(strlen(name) < sizeof(buffer) - EXTRA_CAP);
capability = tterm->Strings[i];
@ -846,7 +850,7 @@ fmt_entry(TERMTYPE *tterm,
*/
if (outcount) {
bool trimmed = FALSE;
j = outbuf.used;
j = (PredIdx) outbuf.used;
if (j >= 2
&& outbuf.text[j - 1] == '\t'
&& outbuf.text[j - 2] == '\n') {
@ -1064,7 +1068,7 @@ dump_entry(TERMTYPE *tterm,
*/
unsigned n;
for (n = STRCOUNT; n < NUM_STRINGS(tterm); n++) {
const char *name = ExtStrname(tterm, n, strnames);
const char *name = ExtStrname(tterm, (int) n, strnames);
if (VALID_STRING(tterm->Strings[n])) {
set_attributes = ABSENT_STRING;
@ -1158,7 +1162,7 @@ show_entry(void)
}
void
compare_entry(void (*hook) (PredType t, PredIdx i, const char *name),
compare_entry(PredHook hook,
TERMTYPE *tp GCC_UNUSED,
bool quiet)
/* compare two entries */
@ -1170,7 +1174,7 @@ compare_entry(void (*hook) (PredType t, PredIdx i, const char *name),
fputs(" comparing booleans.\n", stdout);
for_each_boolean(j, tp) {
i = BoolIndirect(j);
name = ExtBoolname(tp, i, bool_names);
name = ExtBoolname(tp, (int) i, bool_names);
if (isObsolete(outform, name))
continue;
@ -1182,7 +1186,7 @@ compare_entry(void (*hook) (PredType t, PredIdx i, const char *name),
fputs(" comparing numbers.\n", stdout);
for_each_number(j, tp) {
i = NumIndirect(j);
name = ExtNumname(tp, i, num_names);
name = ExtNumname(tp, (int) i, num_names);
if (isObsolete(outform, name))
continue;
@ -1194,7 +1198,7 @@ compare_entry(void (*hook) (PredType t, PredIdx i, const char *name),
fputs(" comparing strings.\n", stdout);
for_each_string(j, tp) {
i = StrIndirect(j);
name = ExtStrname(tp, i, str_names);
name = ExtStrname(tp, (int) i, str_names);
if (isObsolete(outform, name))
continue;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,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 *
@ -32,9 +32,8 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
* $Id: dump_entry.h,v 1.30 2008/07/12 20:23:03 tom Exp $
* $Id: dump_entry.h,v 1.31 2011/05/14 18:00:09 tom Exp $
*
* Dump control definitions and variables
*/
@ -64,16 +63,17 @@
typedef unsigned PredType;
typedef unsigned PredIdx;
typedef int (*PredFunc)(PredType, PredIdx);
typedef int (*PredFunc) (PredType, PredIdx);
typedef void (*PredHook) (PredType, PredIdx, const char *);
extern NCURSES_CONST char *nametrans(const char *);
extern int fmt_entry(TERMTYPE *, PredFunc, bool, bool, bool, int);
extern int show_entry(void);
extern void compare_entry(void (*)(PredType, PredIdx, const char *), TERMTYPE *, bool);
extern void compare_entry(PredHook, TERMTYPE *, bool);
extern void dump_entry(TERMTYPE *, bool, bool, int, PredFunc);
extern void dump_init(const char *, int, int, int, int, bool);
extern void dump_init(const char *, int, int, int, unsigned, bool);
extern void dump_uses(const char *, bool);
extern void repair_acsc(TERMTYPE * tp);
extern void repair_acsc(TERMTYPE *tp);
#define FAIL -1

View File

@ -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 <dump_entry.h>
MODULE_ID("$Id: infocmp.c,v 1.105 2010/05/01 22:04:08 tom Exp $")
MODULE_ID("$Id: infocmp.c,v 1.106 2011/05/14 22:51:04 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@ -70,7 +70,7 @@ static const char *bool_sep = ":";
static const char *s_absent = "NULL";
static const char *s_cancel = "NULL";
static const char *tversion; /* terminfo version selected */
static int itrace; /* trace flag for debugging */
static unsigned itrace; /* trace flag for debugging */
static int mwidth = 60;
static int numbers = 0; /* format "%'char'" to/from "%{number}" */
static int outform = F_TERMINFO; /* output format */
@ -556,7 +556,7 @@ skip_csi(const char *cap)
}
static bool
same_param(const char *table, const char *param, unsigned length)
same_param(const char *table, const char *param, size_t length)
{
bool result = FALSE;
if (strncmp(table, param, length) == 0) {
@ -1090,7 +1090,8 @@ dump_initializers(TERMTYPE *term)
*tp++ = '"';
*tp = '\0';
(void) printf("static char %-20s[] = %s;\n",
string_variable(ExtStrname(term, n, strnames)), buf);
string_variable(ExtStrname(term, (int) n, strnames)),
buf);
}
}
printf("\n");
@ -1116,7 +1117,7 @@ dump_initializers(TERMTYPE *term)
break;
}
(void) printf("\t/* %3u: %-8s */\t%s,\n",
n, ExtBoolname(term, n, boolnames), str);
n, ExtBoolname(term, (int) n, boolnames), str);
}
(void) printf("%s;\n", R_CURL);
@ -1137,7 +1138,7 @@ dump_initializers(TERMTYPE *term)
break;
}
(void) printf("\t/* %3u: %-8s */\t%s,\n", n,
ExtNumname(term, n, numnames), str);
ExtNumname(term, (int) n, numnames), str);
}
(void) printf("%s;\n", R_CURL);
@ -1150,10 +1151,10 @@ dump_initializers(TERMTYPE *term)
else if (term->Strings[n] == CANCELLED_STRING)
str = "CANCELLED_STRING";
else {
str = string_variable(ExtStrname(term, n, strnames));
str = string_variable(ExtStrname(term, (int) n, strnames));
}
(void) printf("\t/* %3u: %-8s */\t%s,\n", n,
ExtStrname(term, n, strnames), str);
ExtStrname(term, (int) n, strnames), str);
}
(void) printf("%s;\n", R_CURL);
@ -1165,15 +1166,15 @@ dump_initializers(TERMTYPE *term)
name_initializer("string_ext"), L_CURL);
for (n = BOOLCOUNT; n < NUM_BOOLEANS(term); ++n) {
(void) printf("\t/* %3u: bool */\t\"%s\",\n",
n, ExtBoolname(term, n, boolnames));
n, ExtBoolname(term, (int) n, boolnames));
}
for (n = NUMCOUNT; n < NUM_NUMBERS(term); ++n) {
(void) printf("\t/* %3u: num */\t\"%s\",\n",
n, ExtNumname(term, n, numnames));
n, ExtNumname(term, (int) n, numnames));
}
for (n = STRCOUNT; n < NUM_STRINGS(term); ++n) {
(void) printf("\t/* %3u: str */\t\"%s\",\n",
n, ExtStrname(term, n, strnames));
n, ExtStrname(term, (int) n, strnames));
}
(void) printf("%s;\n", R_CURL);
}
@ -1269,7 +1270,7 @@ main(int argc, char *argv[])
/* Also avoid overflowing smaller stacks on systems like AmigaOS */
path *tfile = 0;
char **tname = 0;
int maxterms;
size_t maxterms;
char **myargv;
@ -1441,7 +1442,7 @@ main(int argc, char *argv[])
ExitProgram(EXIT_SUCCESS);
case 'v':
itrace = optarg_to_number();
itrace = (unsigned) optarg_to_number();
set_trace_level(itrace);
break;
@ -1460,7 +1461,7 @@ main(int argc, char *argv[])
}
}
maxterms = (argc + 2 - optind);
maxterms = (size_t) (argc + 2 - optind);
tfile = typeMalloc(path, maxterms);
tname = typeCalloc(char *, maxterms);
entries = typeCalloc(ENTRY, maxterms);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
* Copyright (c) 2008-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 *
@ -37,7 +37,7 @@
#define USE_LIBTINFO
#include <progs.priv.h>
MODULE_ID("$Id: tabs.c,v 1.19 2010/10/23 22:26:01 tom Exp $")
MODULE_ID("$Id: tabs.c,v 1.20 2011/05/14 22:34:36 tom Exp $")
static void usage(void) GCC_NORETURN;
@ -227,7 +227,7 @@ comma_is_needed(const char *source)
bool result = FALSE;
if (source != 0) {
unsigned len = strlen(source);
size_t len = strlen(source);
if (len != 0)
result = (source[len - 1] != ',');
} else {
@ -251,7 +251,7 @@ add_to_tab_list(char **append, const char *value)
if (copied != 0 && *copied != '\0') {
const char *comma = ",";
unsigned need = 1 + strlen(copied);
size_t need = 1 + strlen(copied);
if (*copied == ',')
comma = "";

View File

@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tic.c,v 1.147 2011/02/12 18:39:08 tom Exp $")
MODULE_ID("$Id: tic.c,v 1.149 2011/05/14 23:24:57 tom Exp $")
const char *_nc_progname = "tic";
@ -221,7 +221,7 @@ write_it(ENTRY * ep)
}
_nc_set_type(_nc_first_name(ep->tterm.term_names));
_nc_curr_line = ep->startline;
_nc_curr_line = (int) ep->startline;
_nc_write_entry(&ep->tterm);
}
@ -475,7 +475,8 @@ int
main(int argc, char *argv[])
{
char my_tmpname[PATH_MAX];
int v_opt = -1, debug_level;
int v_opt = -1;
unsigned debug_level;
int smart_defaults = TRUE;
char *termcap;
ENTRY *qp;
@ -618,7 +619,7 @@ main(int argc, char *argv[])
last_opt = this_opt;
}
debug_level = (v_opt > 0) ? v_opt : (v_opt == 0);
debug_level = (unsigned) ((v_opt > 0) ? v_opt : (v_opt == 0));
set_trace_level(debug_level);
if (_nc_tracing) {
@ -750,7 +751,7 @@ main(int argc, char *argv[])
for_entry_list(qp) {
if (matches(namelst, qp->tterm.term_names)) {
int j = qp->cend - qp->cstart;
long j = qp->cend - qp->cstart;
int len = 0;
/* this is in case infotocap() generates warnings */
@ -767,7 +768,7 @@ main(int argc, char *argv[])
repair_acsc(&qp->tterm);
dump_entry(&qp->tterm, suppress_untranslatable,
limited, numbers, NULL);
for (j = 0; j < (int) qp->nuses; j++)
for (j = 0; j < (long) qp->nuses; j++)
dump_uses(qp->uses[j].name, !capdump);
len = show_entry();
if (debug_level != 0 && !limited)
@ -915,18 +916,18 @@ keypad_final(const char *string)
return result;
}
static int
static long
keypad_index(const char *string)
{
char *test;
const char *list = "PQRSwxymtuvlqrsPpn"; /* app-keypad except "Enter" */
int ch;
int result = -1;
long result = -1;
if ((ch = keypad_final(string)) != '\0') {
test = strchr(list, ch);
if (test != 0)
result = (test - list);
result = (long) (test - list);
}
return result;
}
@ -1097,11 +1098,11 @@ check_keypad(TERMTYPE *tp)
VALID_STRING(key_c1) &&
VALID_STRING(key_c3)) {
char final[MAX_KP + 1];
int list[MAX_KP];
long list[MAX_KP];
int increase = 0;
int j, k, kk;
int last;
int test;
long last;
long test;
final[0] = keypad_final(key_a1);
final[1] = keypad_final(key_a3);
@ -1592,7 +1593,7 @@ check_termtype(TERMTYPE *tp, bool literal)
for (j = 0; j < NUM_STRINGS(tp); j++) {
char *a = tp->Strings[j];
if (VALID_STRING(a))
check_params(tp, ExtStrname(tp, j, strnames), a);
check_params(tp, ExtStrname(tp, (int) j, strnames), a);
}
check_acs(tp);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2008,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 *
@ -44,7 +44,7 @@
#include <hashed_db.h>
#endif
MODULE_ID("$Id: toe.c,v 1.52 2010/05/01 22:04:08 tom Exp $")
MODULE_ID("$Id: toe.c,v 1.53 2011/05/14 22:35:49 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
@ -340,7 +340,7 @@ main(int argc, char *argv[])
unsigned i;
int code;
int this_opt, last_opt = '?';
int v_opt = 0;
unsigned v_opt = 0;
_nc_progname = _nc_rootname(argv[0]);
@ -349,14 +349,14 @@ main(int argc, char *argv[])
if (isdigit(this_opt)) {
switch (last_opt) {
case 'v':
v_opt = (this_opt - '0');
v_opt = (unsigned) (this_opt - '0');
break;
default:
if (isdigit(last_opt))
v_opt *= 10;
else
v_opt = 0;
v_opt += (this_opt - '0');
v_opt += (unsigned) (this_opt - '0');
last_opt = this_opt;
}
continue;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* 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 *
@ -34,21 +34,21 @@
#include <transform.h>
MODULE_ID("$Id: transform.c,v 1.2 2010/09/04 21:16:17 tom Exp $")
MODULE_ID("$Id: transform.c,v 1.3 2011/05/14 22:41:17 tom Exp $")
#ifdef SUFFIX_IGNORED
static void
trim_suffix(const char *a, unsigned *len)
trim_suffix(const char *a, size_t *len)
{
const char ignore[] = SUFFIX_IGNORED;
if (sizeof(ignore) != 0) {
bool trim = FALSE;
unsigned need = (sizeof(ignore) - 1);
size_t need = (sizeof(ignore) - 1);
if (*len > need) {
unsigned first = *len - need;
unsigned n;
size_t first = *len - need;
size_t n;
trim = TRUE;
for (n = first; n < *len; ++n) {
if (tolower(UChar(a[n])) != tolower(UChar(ignore[n - first]))) {
@ -69,8 +69,8 @@ trim_suffix(const char *a, unsigned *len)
bool
same_program(const char *a, const char *b)
{
unsigned len_a = strlen(a);
unsigned len_b = strlen(b);
size_t len_a = strlen(a);
size_t len_b = strlen(b);
trim_suffix(a, &len_a);
trim_suffix(b, &len_b);

View File

@ -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 *
@ -119,7 +119,7 @@ char *ttyname(int fd);
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tset.c,v 1.82 2010/05/01 21:42:46 tom Exp $")
MODULE_ID("$Id: tset.c,v 1.83 2011/05/14 22:50:45 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
@ -203,7 +203,7 @@ static void
failed(const char *msg)
{
char temp[BUFSIZ];
unsigned len = strlen(_nc_progname) + 2;
size_t len = strlen(_nc_progname) + 2;
if ((int) len < (int) sizeof(temp) - 12) {
strcpy(temp, _nc_progname);

38
test/aclocal.m4 vendored
View File

@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written *
dnl authorization. *
dnl***************************************************************************
dnl
dnl $Id: aclocal.m4,v 1.60 2011/05/07 15:34:44 tom Exp $
dnl $Id: aclocal.m4,v 1.62 2011/05/14 20:46:00 tom Exp $
dnl
dnl Author: Thomas E. Dickey
dnl
@ -40,6 +40,31 @@ dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03
dnl ------------------
dnl Conditionally generate script according to whether we're using a given autoconf.
dnl
dnl $1 = version to compare against
dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
dnl $3 = code to use if AC_ACVERSION is older than $1.
define(CF_ACVERSION_CHECK,
[
ifdef([m4_version_compare],
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
[CF_ACVERSION_COMPARE(
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50
dnl --------------------
dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
dnl MAJOR2, MINOR2, TERNARY2,
dnl PRINTABLE2, not FOUND, FOUND)
define(CF_ACVERSION_COMPARE,
[ifelse(builtin([eval], [$2 < $5]), 1,
[ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
@ -564,7 +589,7 @@ CF_CURSES_HEADER
CF_TERM_HEADER
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CURSES_FUNCS version: 16 updated: 2011/04/09 18:19:55
dnl CF_CURSES_FUNCS version: 17 updated: 2011/05/14 16:07:29
dnl ---------------
dnl Curses-functions are a little complicated, since a lot of them are macros.
AC_DEFUN([CF_CURSES_FUNCS],
@ -585,7 +610,8 @@ do
[
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
${cf_cv_main_return:-return}(foo == 0);
if (foo + 1234 > 5678)
${cf_cv_main_return:-return}(foo);
#endif
],
[cf_result=yes],
@ -2279,7 +2305,7 @@ else
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PKG_CONFIG version: 6 updated: 2011/04/17 06:36:21
dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
dnl -------------
dnl Check for the package-config program, unless disabled by command-line.
AC_DEFUN([CF_PKG_CONFIG],
@ -2296,7 +2322,9 @@ no) #(vi
PKG_CONFIG=none
;;
yes) #(vi
AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
CF_ACVERSION_CHECK(2.52,
[AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
[AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
;;
*)
PKG_CONFIG=$withval

View File

@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
* $Id: color_name.h,v 1.2 2011/04/23 17:15:01 tom Exp $
* $Id: color_name.h,v 1.3 2011/05/14 17:41:17 tom Exp $
*/
#ifndef __COLORNAME_H
@ -64,7 +64,7 @@ color_code(const char *color)
char *endp = 0;
size_t n;
if ((result = strtol(color, &endp, 0)) >= 0
if ((result = (int) strtol(color, &endp, 0)) >= 0
&& (endp == 0 || *endp == 0)) {
;
} else if (!strcmp(color, "default")) {

1197
test/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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 *
@ -50,7 +50,7 @@
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
* $Id: view.c,v 1.81 2010/11/14 01:06:02 tom Exp $
* $Id: view.c,v 1.82 2011/05/14 17:43:12 tom Exp $
*/
#include <test.priv.h>
@ -180,7 +180,7 @@ ch_dup(char *src)
{
unsigned len = (unsigned) strlen(src);
NCURSES_CH_T *dst = typeMalloc(NCURSES_CH_T, len + 1);
unsigned j, k;
size_t j, k;
#if USE_WIDEC_SUPPORT
wchar_t wstr[CCHARW_MAX + 1];
wchar_t wch;