-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1581 2010/08/14 23:32:54 tom Exp $
+-- $Id: NEWS,v 1.1585 2010/08/28 20:52:23 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.
+20100828
+ + modify nsterm, xnuppc and tek4115 to make sgr/sgr0 consistent -TD
+ + add check in terminfo source-reader to provide more informative
+ message when someone attempts to run tic on a compiled terminal
+ description (prompted by Debian #593920).
+ + note in infotocap and captoinfo manpages that they read terminal
+ descriptions from text-files (Debian #593920).
+ + improve acsc string for vt52, show arrow keys (patch by Benjamin
+ Sittler).
+
20100814
+ document in manpages that "mv" functions first use wmove() to check
the window pointer and whether the position lies within the window
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.770 2010/08/14 18:03:33 tom Exp $
+# $Id: dist.mk,v 1.771 2010/08/28 15:35:26 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 = 20100814
+NCURSES_PATCH = 20100828
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: captoinfo.1m,v 1.23 2010/07/31 16:12:01 tom Exp $
+.\" $Id: captoinfo.1m,v 1.24 2010/08/28 19:36:31 tom Exp $
.TH @CAPTOINFO@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH SYNOPSIS
\fB@CAPTOINFO@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
-\fB@CAPTOINFO@\fR looks in \fIfile\fR for \fBtermcap\fR descriptions. For each
+\fB@CAPTOINFO@\fR looks in each given text
+\fIfile\fR for \fBtermcap\fR descriptions.
+For each
one found, an equivalent \fBterminfo\fR description is written to standard
-output. Termcap \fBtc\fR capabilities are translated directly to terminfo
+output.
+Termcap \fBtc\fR capabilities are translated directly to terminfo
\fBuse\fR capabilities.
.PP
If no \fIfile\fR is given, then the environment variable \fBTERMCAP\fR is used
-for the filename or entry. If \fBTERMCAP\fR is a full pathname to a file, only
+for the filename or entry.
+If \fBTERMCAP\fR is a full pathname to a file, only
the terminal whose name is specified in the environment variable \fBTERM\fR is
-extracted from that file. If the environment variable \fBTERMCAP\fR is not
+extracted from that file.
+If the environment variable \fBTERMCAP\fR is not
set, then the file \fB\*d\fR is read.
.TP 5
\fB\-v\fR
print out the version of the program in use on standard error and exit.
.TP 5
\fB\-1\fR
-cause the fields to print out one to a line. Otherwise, the fields
+cause the fields to print out one to a line.
+Otherwise, the fields
will be printed several to a line to a maximum width of 60
characters.
.TP 5
.PP
XENIX termcap also used to have a set of extension capabilities
for forms drawing, designed to take advantage of the IBM PC
-high-half graphics. They were as follows:
+high-half graphics.
+They were as follows:
.PP
.TS H
c c
.TE
.PP
If the single-line capabilities occur in an entry, they will automatically
-be composed into an \fIacsc\fR string. The double-line capabilities and
+be composed into an \fIacsc\fR string.
+The double-line capabilities and
\fBGG\fR are discarded with a warning message.
.PP
IBM's AIX has a terminfo facility descended from SVr1 terminfo but incompatible
-with the SVr4 format. The following AIX extensions are automatically
+with the SVr4 format.
+The following AIX extensions are automatically
translated:
.TS
c c
This utility is actually a link to \fB@TIC@\fR(1M), running in \fI\-I\fR mode.
You can use other \fB@TIC@\fR options such as \fB\-f\fR and \fB\-x\fR.
.PP
-The trace option is not identical to SVr4's. Under SVr4, instead of following
+The trace option is not identical to SVr4's.
+Under SVr4, instead of following
the \fB\-v\fR with a trace level n, you repeat it n times.
.SH SEE ALSO
\fB@INFOCMP@\fR(1M),
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.SH AUTHOR
Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: infotocap.1m,v 1.9 2010/07/31 16:08:48 tom Exp $
+.\" $Id: infotocap.1m,v 1.10 2010/08/28 19:40:02 tom Exp $
.TH @INFOTOCAP@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH SYNOPSIS
\fB@INFOTOCAP@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
-\fB@INFOTOCAP@\fR looks in \fIfile\fR for \fBterminfo\fR descriptions. For each
-one found, an equivalent \fBtermcap\fR description is written to standard
-output. Terminfo \fBuse\fR capabilities are translated directly to termcap
+\fB@INFOTOCAP@\fR looks in each given text
+\fIfile\fR for \fBterminfo\fR descriptions.
+For each terminfo description found,
+an equivalent \fBtermcap\fR description is written to standard output.
+Terminfo \fBuse\fR capabilities are translated directly to termcap
\fBtc\fR capabilities.
.TP 5
\fB\-v\fR
print out the version of the program in use on standard error and exit.
.TP 5
\fB\-1\fR
-cause the fields to print out one to a line. Otherwise, the fields
-will be printed several to a line to a maximum width of 60
-characters.
+cause the fields to print out one to a line.
+Otherwise, the fields
+will be printed several to a line to a maximum width of 60 characters.
.TP 5
\fB\-w\fR
change the output to \fIwidth\fR characters.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tic.1m,v 1.45 2010/07/31 16:08:48 tom Exp $
+.\" $Id: tic.1m,v 1.46 2010/08/28 19:41:09 tom Exp $
.TH @TIC@ 1M ""
.ds n 5
.ds d @TERMINFO@
.br
.SH DESCRIPTION
The command \fBtic\fR translates a \fBterminfo\fR file from source
-format into compiled format. The compiled format is necessary for use with
+format into compiled format.
+The compiled format is necessary for use with
the library routines in \fBncurses\fR(3X).
.PP
The results are normally placed in the system terminfo
-directory \fB\*d\fR. There are two ways to change this behavior.
+directory \fB\*d\fR.
+There are two ways to change this behavior.
.PP
First, you may override the system default by setting the variable
\fBTERMINFO\fR in your shell environment to a valid (existing) directory name.
.TP
\fB\-a\fR
tells \fBtic\fP to retain commented-out capabilities rather than discarding
-them. Capabilities are commented by prefixing them with a period.
+them.
+Capabilities are commented by prefixing them with a period.
This sets the \fB\-x\fR option, because it treats the commented-out
entries as user-defined names.
If the source is termcap, accept the 2-character names required by version 6.
Otherwise these are ignored.
.TP
\fB\-C\fR
-Force source translation to termcap format. Note: this differs from the \fB\-C\fR
+Force source translation to termcap format.
+Note: this differs from the \fB\-C\fR
option of \fB@INFOCMP@\fR(1M) in that it does not merely translate capability
-names, but also translates terminfo strings to termcap format. Capabilities
+names, but also translates terminfo strings to termcap format.
+Capabilities
that are not translatable are left in the entry under their terminfo names
but commented out with two preceding dots.
.TP
\fB\-c\fR
tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and
-bad use links. If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code
+bad use links.
+If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code
will print warnings about entries which, after use resolution, are more than
-1023 (4096) bytes long. Due to a fixed buffer length in older termcap
+1023 (4096) bytes long.
+Due to a fixed buffer length in older termcap
libraries (and a documented limit in terminfo), these entries may cause core
dumps.
.TP
using the long C variable names listed in <\fBterm.h\fR>
.TP
\fB\-N\fR
-Disable smart defaults.
+Disable smart defaults.
Normally, when translating from termcap to terminfo, the compiler makes
a number of assumptions about the defaults of string capabilities
\fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR,
\fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR,
\fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts
-to use obsolete termcap capabilities to deduce correct values. It also
+to use obsolete termcap capabilities to deduce correct values.
+It also
normally suppresses output of obsolete termcap capabilities such as \fBbs\fR.
This option forces a more literal translation that also preserves the
obsolete capabilities.
.TP
\fB\-o\fR\fIdir\fR
-Write compiled entries to given directory. Overrides the TERMINFO environment
+Write compiled entries to given directory.
+Overrides the TERMINFO environment
variable.
.TP
\fB\-R\fR\fIsubset\fR
-Restrict output to a given subset. This option is for use with archaic
+Restrict output to a given subset.
+This option is for use with archaic
versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
-that have their own extensions incompatible with SVr4/XSI. Available subsets
+that have their own extensions incompatible with SVr4/XSI.
+Available subsets
are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
.TP
\fB\-r\fR
Force entry resolution (so there are no remaining tc capabilities) even
-when doing translation to termcap format. This may be needed if you are
+when doing translation to termcap format.
+This may be needed if you are
preparing a termcap file for a termcap library (such as GNU termcap through
version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple
tc capabilities per entry.
.TP
\fIfile\fR
contains one or more \fBterminfo\fR terminal descriptions in source
-format [see \fBterminfo\fR(\*n)]. Each description in the file
+format [see \fBterminfo\fR(\*n)].
+Each description in the file
describes the capabilities of a particular terminal.
.PP
The debug flag levels are as follows:
If the debug level \fIn\fR is not given, it is taken to be one.
.PP
All but one of the capabilities recognized by \fBtic\fR are documented
-in \fBterminfo\fR(\*n). The exception is the \fBuse\fR capability.
+in \fBterminfo\fR(\*n).
+The exception is the \fBuse\fR capability.
.PP
When a \fBuse\fR=\fIentry\fR\-\fIname\fR field is discovered in a
terminal entry currently being compiled, \fBtic\fR reads in the binary
-from \fB\*d\fR to complete the entry. (Entries created from
-\fIfile\fR will be used first. If the environment variable
+from \fB\*d\fR to complete the entry.
+(Entries created from
+\fIfile\fR will be used first.
+If the environment variable
\fBTERMINFO\fR is set, that directory is searched instead of
\fB\*d\fR.) \fBtic\fR duplicates the capabilities in
\fIentry\fR\-\fIname\fR for the current entry, with the exception of
If the environment variable \fBTERMINFO\fR is set, the compiled
results are placed there instead of \fB\*d\fR.
.PP
-Total compiled entries cannot exceed 4096 bytes. The name field cannot
-exceed 512 bytes. Terminal names exceeding the maximum alias length
+Total compiled entries cannot exceed 4096 bytes.
+The name field cannot
+exceed 512 bytes.
+Terminal names exceeding the maximum alias length
(32 characters on systems with long filenames, 14 characters otherwise)
will be truncated to the maximum alias length and a warning message will be printed.
.SH COMPATIBILITY
There is some evidence that historic \fBtic\fR implementations treated
description fields with no whitespace in them as additional aliases or
-short names. This \fBtic\fR does not do that, but it does warn when
+short names.
+This \fBtic\fR does not do that, but it does warn when
description fields may be treated that way and check them for dangerous
characters.
.SH EXTENSIONS
Unlike the stock SVr4 \fBtic\fR command, this implementation can actually
-compile termcap sources. In fact, entries in terminfo and termcap syntax can
-be mixed in a single source file. See \fBterminfo\fR(\*n) for the list of
+compile termcap sources.
+In fact, entries in terminfo and termcap syntax can
+be mixed in a single source file.
+See \fBterminfo\fR(\*n) for the list of
termcap names taken to be equivalent to terminfo names.
.PP
The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.364 $
-# $Date: 2010/07/17 22:55:06 $
+# $Revision: 1.367 $
+# $Date: 2010/08/28 20:43:25 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
vt52|dec vt52,
OTbs,
cols#80, it#8, lines#24,
- acsc=ffgghhompoqqss.k, bel=^G, clear=\EH\EJ, cr=^M,
+ acsc=ffggolpnqprrss+h.k0a, bel=^G, clear=\EH\EJ, cr=^M,
cub1=\ED, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l,
rmso=\E[m, rmul=\E[m,
- sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
+ sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
vpa=\E[%p1%{1}%+%dd,
# The tek4125 emulates a vt100 incorrectly - the scrolling region
rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
- sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+ sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
enacs=\E(B\E)0, rmacs=^O,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
- smacs=^N, use=nsterm+7,
+ sgr0=\E[m\017, smacs=^N, use=nsterm+7,
nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377,
enacs=\E(B\E)0, rmacs=^O,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
- smacs=^N, use=nsterm+7,
+ sgr0=\E[m\017, smacs=^N, use=nsterm+7,
nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support,
hs,
rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
sc=\E7,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
- sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+ sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
smul=\E[4m, tbc=\E[3g, use=vt100+keypad,
xnuppc+c|Darwin PowerPC Console ANSI color support,
# * add hard-reset for rs2 to wsvt25 to help ensure that reset ends
# the alternate character set (patch by Nicholas Marriott)
#
+# 2010-08-28
+# * improve acsc for vt52 (Benjamin Sittler)
+# * modify nsterm entries for consistent sgr/sgr0 -TD
+# * modify xnuppc entries for consistent sgr/sgr0 -TD
+# * add invis to tek4115 sgr -TD
+#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.119 2010/05/22 20:00:35 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.120 2010/08/28 20:58:29 tom Exp $")
#include <fifo_defs.h>
NCURSES_EXPORT(int)
_nc_wgetch(WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta
EVENTLIST_2nd(_nc_eventlist * evl))
{
* cursor to the left.
*/
if (sp->_echo && !(win->_flags & _ISPAD)) {
- chtype backup = (ch == KEY_BACKSPACE) ? '\b' : ch;
+ chtype backup = (chtype) ((ch == KEY_BACKSPACE) ? '\b' : ch);
if (backup < KEY_MIN)
wechochar(win, backup);
}
wgetch_events(WINDOW *win, _nc_eventlist * evl)
{
int code;
- unsigned long value;
+ int value;
T((T_CALLED("wgetch_events(%p,%p)"), win, evl));
code = _nc_wgetch(win,
wgetch(WINDOW *win)
{
int code;
- unsigned long value;
+ int value;
T((T_CALLED("wgetch(%p)"), (void *) win));
code = _nc_wgetch(win,
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: tries.c,v 1.29 2009/10/24 22:39:11 tom Exp $")
+MODULE_ID("$Id: tries.c,v 1.30 2010/08/28 21:08:23 tom Exp $")
/*
* Expand a keycode into the string that it corresponds to, returning null if
#ifdef TRACE
if (len == 0 && USE_TRACEF(TRACE_MAXIMUM)) {
_tracef("expand_key %s %s",
- _nc_tracechar(CURRENT_SCREEN, code),
+ _nc_tracechar(CURRENT_SCREEN, (int) code),
_nc_visbuf(result));
_nc_unlock_global(tracef);
}
/*
- * $Id: curses.priv.h,v 1.464 2010/07/31 22:16:10 tom Exp $
+ * $Id: curses.priv.h,v 1.465 2010/08/28 20:56:48 tom Exp $
*
* curses.priv.h
*
extern NCURSES_EXPORT(bool) _nc_reset_colors(void);
/* lib_getch.c */
-extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *));
+extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, int *, int EVENTLIST_2nd(_nc_eventlist *));
/* lib_insch.c */
extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype);
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: comp_scan.c,v 1.87 2010/05/01 19:56:35 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.88 2010/08/28 19:26:09 tom Exp $")
/*
* Maximum length of string capability we'll accept before raising an error.
if (fgets(result + used, (int) (allocated - used), yyin) != 0) {
bufstart = result;
if (used == 0) {
+ if (_nc_curr_line == 0
+ && IS_TIC_MAGIC(result)) {
+ _nc_err_abort("This is a compiled terminal description, not a source");
+ }
_nc_curr_line++;
_nc_curr_col = 0;
}
/****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: setbuf.c,v 1.15 2009/05/23 22:13:44 tom Exp $")
+MODULE_ID("$Id: setbuf.c,v 1.16 2010/08/28 21:08:31 tom Exp $")
/*
* If the output file descriptor is connected to a tty (the typical case) it
setmode(ofp, O_BINARY);
#endif
if (buffered != 0) {
- buf_len = min(Lines * (Cols + 6), 2800);
+ buf_len = (unsigned) min(Lines * (Cols + 6), 2800);
if ((buf_ptr = SP_PARM->_setbuf) == 0) {
if ((buf_ptr = typeMalloc(char, buf_len)) == NULL)
return;
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.76 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.77 2010/08/28 21:04:05 tom Exp $")
static int total_written;
for (i = 0; i < tp->ext_Strings; ++i) {
if (tp->Strings[STRCOUNT + i] != ABSENT_STRING)
- result = (i + 1);
+ result = (unsigned short) (i + 1);
}
return result;
}
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_traceatr.c,v 1.70 2010/05/01 19:33:19 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.71 2010/08/28 21:05:25 tom Exp $")
#define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
result = _nc_trace_bufcat(bufnum, names[n].name);
if (names[n].val == A_COLOR) {
- short pairnum = PairNumber(newmode);
+ short pairnum = (short) PairNumber(newmode);
#ifdef USE_TERMLIB
/* pair_content lives in libncurses */
(void) sprintf(temp, "{%d}", pairnum);
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: trace_buf.c,v 1.14 2008/08/03 15:13:56 tom Exp $")
+MODULE_ID("$Id: trace_buf.c,v 1.15 2010/08/28 21:08:42 tom Exp $")
#define MyList _nc_globals.tracebuf_ptr
#define MySize _nc_globals.tracebuf_used
if (bufnum >= 0) {
if ((size_t) (bufnum + 1) > MySize) {
- size_t need = (bufnum + 1) * 2;
+ size_t need = (size_t) (bufnum + 1) * 2;
if ((MyList = typeRealloc(TRACEBUF, need, MyList)) != 0) {
while (need > MySize)
MyList[MySize++].text = 0;
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_get_wch.c,v 1.21 2010/05/01 22:04:08 tom Exp $")
+MODULE_ID("$Id: lib_get_wch.c,v 1.22 2010/08/28 21:00:35 tom Exp $")
NCURSES_EXPORT(int)
wget_wch(WINDOW *win, wint_t *result)
char buffer[(MB_LEN_MAX * 9) + 1]; /* allow some redundant shifts */
int status;
size_t count = 0;
- unsigned long value = 0;
+ int value = 0;
wchar_t wch;
#ifndef state_unused
mbstate_t state;
* whether the improvement would be worth the effort.
*/
if (count != 0) {
- safe_ungetch(SP_PARM, (int) value);
+ safe_ungetch(SP_PARM, value);
code = ERR;
}
break;
} else if (count + 1 >= sizeof(buffer)) {
- safe_ungetch(SP_PARM, (int) value);
+ safe_ungetch(SP_PARM, value);
code = ERR;
break;
} else {
reset_mbytes(state);
if (check_mbytes(wch, buffer, count, state) != status) {
code = ERR; /* the two calls should match */
- safe_ungetch(SP_PARM, (int) value);
+ safe_ungetch(SP_PARM, value);
}
value = wch;
break;
} else {
code = ERR;
}
- *result = value;
+ *result = (wint_t) value;
_nc_unlock_global(curses);
- T(("result %#lo", value));
+ T(("result %#o", value));
returnCode(code);
}