-------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2007,2008 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 --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1188 2007/12/22 23:56:08 tom Exp $
+-- $Id: NEWS,v 1.1195 2008/01/06 00:01:08 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.
+20080105
+ + several improvements to terminfo entries based on xterm #230 -TD
+ + modify MKlib_gen.sh to handle keyname/key_name prototypes, so the
+ "link_test" builds properly.
+ + fix for toe command-line options -u/-U to ensure filename is given.
+ + fix allocation-size for command-line parsing in infocmp from 20070728
+ (report by Miroslav Lichvar)
+ + improve resizeterm() by moving ripped-off lines, and repainting the
+ soft-keys (report by Katarina Machalkova)
+ + add clarification in wclear's manpage noting that the screen will be
+ cleared even if a subwindow is cleared (prompted by Christer Enfors
+ question).
+ + change test/ncurses.c soft-key tests to work with KEY_RESIZE.
+
20071222
+ continue implementing support for threading demo by adding mutex
for delwin().
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.620 2007/12/22 20:41:31 tom Exp $
+# $Id: dist.mk,v 1.622 2008/01/05 19:49:50 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 = 6
-NCURSES_PATCH = 20071222
+NCURSES_PATCH = 20080105
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
.\"***************************************************************************
-.\" Copyright (c) 1998,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_clear.3x,v 1.10 2005/10/01 19:34:43 tom Exp $
+.\" $Id: curs_clear.3x,v 1.11 2007/12/29 15:58:38 tom Exp $
.TH curs_clear 3X ""
.na
.hy 0
That fact is not documented in other implementations,
and may not be true of implementations
which were not derived from SVr4 source.
+.PP
+Not obvious from the description,
+most implementations clear the screen after \fBwclear\fP
+even for a subwindow or derived window.
+If you do not want to clear the screen during the next \fBwrefresh\fP,
+use \fBwerase\fP instead.
.SH SEE ALSO
\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
.\"#
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2008 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: toe.1m,v 1.20 2006/12/24 17:20:37 tom Exp $
+.\" $Id: toe.1m,v 1.21 2008/01/05 20:57:16 tom Exp $
.TH @TOE@ 1M ""
.ds n 5
.ds d @TERMINFO@
.br
.SH DESCRIPTION
.PP
-With no options, \fBtoe\fR lists all available terminal types by primary name
-with descriptions. File arguments specify the directories to be scanned; if no
-such arguments are given, your default terminfo directory is scanned. If you
-also specify the \fB-h\fR option, a directory header will be issued as each
+With no options,
+\fBtoe\fR lists all available terminal types by primary name
+with descriptions.
+File arguments specify the directories to be scanned; if no
+such arguments are given,
+your default terminfo directory is scanned.
+If you also specify the \fB-h\fR option,
+a directory header will be issued as each
directory is entered.
.PP
There are other options intended for use by terminfo file maintainers:
rather than only the first one that it finds.
.TP
\fB-u\fR \fIfile\fR
-says to issue a report on dependencies in the given file. This report condenses
-the `use' relation: each line consists of the primary name of a terminal that
-has use capabilities, followed by a colon, followed by the
+says to write a report to the standard output,
+listing dependencies in the given terminfo/termcap source file.
+The report condenses the `use' relation:
+each line consists of the primary name of a terminal that
+has use capabilities,
+followed by a colon,
+followed by the
whitespace-separated primary names of all terminals which occur in those use
-capabilities, followed by a newline
+capabilities,
+followed by a newline
.TP
\fB-U\fR \fIfile\fR
-says to issue a report on reverse dependencies in the given file. This report
-reverses the `use' relation: each line consists of the primary name of a
-terminal that occurs in use capabilities, followed by a colon, followed by the
+says to write a report to the standard output,
+listing reverse dependencies in the given terminfo/termcap source file.
+The report reverses the `use' relation:
+each line consists of the primary name of a
+terminal that occurs in use capabilities,
+followed by a colon,
+followed by the
whitespace-separated primary names of all terminals which depend on it,
followed by a newline.
.TP
interpreted as for \fB@TIC@\fR(1M).
.TP
\fB-V\fR
-reports the version of ncurses which was used in this program, and exits.
+reports the version of ncurses which was used in this program,
+and exits.
.SH FILES
.TP 5
\fB\*d/?/*\fR
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.318 $
-# $Date: 2007/11/03 19:02:01 $
+# $Revision: 1.326 $
+# $Date: 2007/11/12 00:22:07 $
#
# 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
cnorm=\E[?12l\E[?25h, cvvis=\E[?12;25h, indn=\E[%p1%dS,
rin=\E[%p1%dT, use=xterm-xf86-v43,
-# This is the most common alias for xterm-new.
xterm-xfree86|xterm terminal emulator (XFree86),
- use=xterm-new,
-# use=xterm-old,
+ use=xterm-xf86-v44,
# This version reflects the current xterm features.
xterm-new|modern xterm terminal emulator,
# The meta key may also be used as a modifier in this scheme, adding another
# bit to the parameter.
xterm+pcfkeys|fragment for PC-style fkeys,
- use=xterm+pcf2, use=xterm+pcc2,
+ use=xterm+app, use=xterm+pcf2, use=xterm+pcc2,
+ use=xterm+pce2,
+#
+xterm+noapp|fragment with cursor keys in normal mode,
+ kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[F,
+ khome=\E[H,
+
+xterm+app|fragment with cursor keys in application mode,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF,
+ khome=\EOH,
#
# The "PC-style" modifier scheme was introduced in xterm patch #94 (1999/3/27)
# and revised in patch #167 (2002/8/24). Some other terminal emulators copied
# that might apply to xterm+pcfkeys with different values of that resource.
xterm+pcc3|fragment with modifyCursorKeys:3,
kLFT=\E[>1;2D, kRIT=\E[>1;2C, kind=\E[>1;2B,
- kri=\E[>1;2A, kDN=\E[>1;2B, kDN5=\E[>1;5B, kDN6=\E[>1;6B,
- kLFT5=\E[>1;5D, kLFT6=\E[>1;6D, kRIT5=\E[>1;5C,
- kRIT6=\E[>1;6C, kUP=\E[>1;2A, kUP5=\E[>1;5A,
- kUP6=\E[>1;6A,
+ kri=\E[>1;2A, kDN=\E[>1;2B, kDN3=\E[>1;3B, kDN4=\E[>1;4B,
+ kDN5=\E[>1;5B, kDN6=\E[>1;6B, kDN7=\E[>1;7B,
+ kLFT3=\E[>1;3D, kLFT4=\E[>1;4D, kLFT5=\E[>1;5D,
+ kLFT6=\E[>1;6D, kLFT7=\E[>1;7D, kRIT3=\E[>1;3C,
+ kRIT4=\E[>1;4C, kRIT5=\E[>1;5C, kRIT6=\E[>1;6C,
+ kRIT7=\E[>1;7C, kUP=\E[>1;2A, kUP3=\E[>1;3A,
+ kUP4=\E[>1;4A, kUP5=\E[>1;5A, kUP6=\E[>1;6A,
+ kUP7=\E[>1;7A,
xterm+pcc2|fragment with modifyCursorKeys:2,
kLFT=\E[1;2D, kRIT=\E[1;2C, kind=\E[1;2B, kri=\E[1;2A,
- kDN=\E[1;2B, kDN5=\E[1;5B, kDN6=\E[1;6B, kLFT5=\E[1;5D,
- kLFT6=\E[1;6D, kRIT5=\E[1;5C, kRIT6=\E[1;6C, kUP=\E[1;2A,
- kUP5=\E[1;5A, kUP6=\E[1;6A,
+ kDN=\E[1;2B, kDN3=\E[1;3B, kDN4=\E[1;4B, kDN5=\E[1;5B,
+ kDN6=\E[1;6B, kDN7=\E[1;7B, kLFT3=\E[1;3D, kLFT4=\E[1;4D,
+ kLFT5=\E[1;5D, kLFT6=\E[1;6D, kLFT7=\E[1;7D,
+ kRIT3=\E[1;3C, kRIT4=\E[1;4C, kRIT5=\E[1;5C,
+ kRIT6=\E[1;6C, kRIT7=\E[1;7C, kUP=\E[1;2A, kUP3=\E[1;3A,
+ kUP4=\E[1;4A, kUP5=\E[1;5A, kUP6=\E[1;6A, kUP7=\E[1;7A,
xterm+pcc1|fragment with modifyCursorKeys:1,
kLFT=\E[2D, kRIT=\E[2C, kind=\E[2B, kri=\E[2A, kDN=\E[2B,
- kDN5=\E[5B, kDN6=\E[6B, kLFT5=\E[5D, kLFT6=\E[6D,
- kRIT5=\E[5C, kRIT6=\E[6C, kUP=\E[2A, kUP5=\E[5A,
- kUP6=\E[6A,
+ kDN3=\E[3B, kDN4=\E[4B, kDN5=\E[5B, kDN6=\E[6B, kDN7=\E[7B,
+ kLFT3=\E[3D, kLFT4=\E[4D, kLFT5=\E[5D, kLFT6=\E[6D,
+ kLFT7=\E[7D, kRIT3=\E[3C, kRIT4=\E[4C, kRIT5=\E[5C,
+ kRIT6=\E[6C, kRIT7=\E[7C, kUP=\E[2A, kUP3=\E[3A,
+ kUP4=\E[4A, kUP5=\E[5A, kUP6=\E[6A, kUP7=\E[7A,
xterm+pcc0|fragment with modifyCursorKeys:0,
kLFT=\EO2D, kRIT=\EO2C, kind=\EO2B, kri=\EO2A, kDN=\EO2B,
- kDN5=\EO5B, kDN6=\EO6B, kLFT5=\EO5D, kLFT6=\EO6D,
- kRIT5=\EO5C, kRIT6=\EO6C, kUP=\EO2A, kUP5=\EO5A,
- kUP6=\EO6A,
+ kDN3=\EO3B, kDN4=\EO4B, kDN5=\EO5B, kDN6=\EO6B, kDN7=\EO7B,
+ kLFT3=\EO3D, kLFT4=\EO4D, kLFT5=\EO5D, kLFT6=\EO6D,
+ kLFT7=\EO7D, kRIT3=\EO3C, kRIT4=\EO4C, kRIT5=\EO5C,
+ kRIT6=\EO6C, kRIT7=\EO7C, kUP=\EO2A, kUP3=\EO3A,
+ kUP4=\EO4A, kUP5=\EO5A, kUP6=\EO6A, kUP7=\EO7A,
#
# Here are corresponding fragments from xterm patch #216:
kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
kf8=\E[19~, kf9=\E[20~,
#
+# Chunks from xterm #230:
+xterm+pce2|fragment with modifyCursorKeys:2,
+ kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~,
+ kNXT=\E[6;2~, kPRV=\E[5;2~, kich1=\E[2~, knp=\E[6~,
+ kpp=\E[5~, kDC3=\E[3;3~, kDC4=\E[3;4~, kDC5=\E[3;5~,
+ kDC6=\E[3;6~, kDC7=\E[3;7~, kEND3=\E[1;3F, kEND4=\E[1;4F,
+ kEND5=\E[1;5F, kEND6=\E[1;6F, kEND7=\E[1;7F,
+ kHOM3=\E[1;3H, kHOM4=\E[1;4H, kHOM5=\E[1;5H,
+ kHOM6=\E[1;6H, kHOM7=\E[1;7H, kIC3=\E[2;3~, kIC4=\E[2;4~,
+ kIC5=\E[2;5~, kIC6=\E[2;6~, kIC7=\E[2;7~, kNXT3=\E[6;3~,
+ kNXT4=\E[6;4~, kNXT5=\E[6;5~, kNXT6=\E[6;6~,
+ kNXT7=\E[6;7~, kPRV3=\E[5;3~, kPRV4=\E[5;4~,
+ kPRV5=\E[5;5~, kPRV6=\E[5;6~, kPRV7=\E[5;7~,
+ use=xterm+edit,
+
+xterm+edit|fragment for 6-key editing-keypad,
+ kdch1=\E[3~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
+ use=xterm+pc+edit,
+
+xterm+pc+edit|fragment for pc-style editing keypad,
+ kend=\E[4~, khome=\E[1~,
+
+xterm+vt+edit|fragment for vt220-style editing keypad,
+ kfnd=\E[1~, kslt=\E[4~,
+
+#
# Those chunks use the new-style (the xterm oldFunctionKeys resource is false).
# Alternatively, the same scheme with old-style function keys as in xterm-r6
# is shown here (because that is used in mrxvt and mlterm):
flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^H,
- kdch1=\E[3~, kmous=\E[M, mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
- meml=\El, memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
+ kmous=\E[M, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
+ memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
- use=xterm-basic, use=vt220+keypad,
+ use=xterm+app, use=xterm+edit, use=xterm-basic,
+ use=vt220+keypad,
xterm-vt52|xterm emulating dec vt52,
cols#80, it#8, lines#24,
kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF,
xterm-noapp|xterm with cursor keys in normal mode,
- kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rmcup@,
- rmkx=\E>, smcup@, smkx=\E=, use=xterm,
+ rmcup@, rmkx=\E>, smcup@, smkx=\E=, use=xterm+noapp,
+ use=xterm,
xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
- lines#24, use=xterm,
+ lines#24, use=xterm-old,
# This is xterm for ncurses.
xterm|xterm terminal emulator (X Window System),
#
# xterm with bold instead of underline
xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold,
- smso=\E[7m, smul=\E[1m, use=xterm,
+ smso=\E[7m, smul=\E[1m, use=xterm-old,
# (kterm: this had extension capabilities ":KJ:TY=ascii:" -- esr)
# (kterm should not invoke DEC Graphics as the alternate character set
# -- Kenji Rikitake)
# 2007-11-03
# * correct acsc strings for h19 and z100 (Benjamin Sittler)
#
+# 2007-11-11
+# * use xterm-xf86-v44 for "xterm-xfree86", reflecting changes to
+# xterm starting with patch #216 -TD
+# * make legacy xterm entries such as xterm-24 inherit from xterm-old,
+# to match xterm #230 -TD
+# * extend xterm+pccX entries to match xterm #230 -TD
+# * add xterm+app, xterm+noapp, from xterm #230 -TD
+# * add/use xterm+pce2 from xterm #230, in xterm+pcfkeys -TD
+#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.29 2007/08/18 13:17:14 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.30 2008/01/05 23:21:10 tom Exp $)
#
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2007,2008 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 "Software"), #
| sed \
-e 's/^.*T_CALLED.*returnCode( \([a-z].*) \));/ return \1;/' \
-e 's/^.*T_CALLED.*returnCode( \((wmove.*) \));/ return \1;/' \
+ -e 's/gen_//' \
| sed -f $ED4
#include <term.h> /* cur_term */
#include <tic.h>
-MODULE_ID("$Id: lib_set_term.c,v 1.100 2007/09/08 21:23:43 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.102 2007/12/29 20:36:32 tom Exp $")
NCURSES_EXPORT(SCREEN *)
set_term(SCREEN *screenp)
}
#endif
-#define ripoff_sp _nc_prescreen.rsp
-#define ripoff_stack _nc_prescreen.rippedoff
-
/* OS-independent screen initializations */
NCURSES_EXPORT(int)
_nc_setupscreen(int slines GCC_UNUSED,
? SP->_lines_avail - count
: 0),
0);
- if (w)
+ if (w) {
+ rop->win = w;
rop->hook(w, scolumns);
- else
+ } else {
returnCode(ERR);
+ }
if (rop->line < 0)
bottom_stolen += count;
else
NCURSES_EXPORT(int)
ripoffline(int line, int (*init) (WINDOW *, int))
{
+ START_TRACE();
T((T_CALLED("ripoffline(%d,%p)"), line, init));
if (line == 0)
/****************************************************************************
- * Copyright (c) 1998-2001,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 *
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1996-1999 *
+ * and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkclear.c,v 1.9 2006/05/27 19:21:19 tom Exp $")
+MODULE_ID("$Id: lib_slkclear.c,v 1.10 2007/12/29 17:51:47 tom Exp $")
NCURSES_EXPORT(int)
slk_clear(void)
{
+ int rc = ERR;
+
T((T_CALLED("slk_clear()")));
- if (SP == NULL || SP->_slk == NULL)
- returnCode(ERR);
- SP->_slk->hidden = TRUE;
- /* For simulated SLK's it's looks much more natural to
- inherit those attributes from the standard screen */
- SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
- WINDOW_ATTRS(SP->_slk->win) = WINDOW_ATTRS(stdscr);
- if (SP->_slk->win == stdscr) {
- returnCode(OK);
- } else {
- werase(SP->_slk->win);
- returnCode(wrefresh(SP->_slk->win));
+ if (SP != NULL && SP->_slk != NULL) {
+ SP->_slk->hidden = TRUE;
+ /* For simulated SLK's it looks much more natural to
+ inherit those attributes from the standard screen */
+ SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
+ WINDOW_ATTRS(SP->_slk->win) = WINDOW_ATTRS(stdscr);
+ if (SP->_slk->win == stdscr) {
+ rc = OK;
+ } else {
+ werase(SP->_slk->win);
+ rc = wrefresh(SP->_slk->win);
+ }
}
+ returnCode(rc);
}
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 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>
#include <term.h>
-MODULE_ID("$Id: resizeterm.c,v 1.24 2007/12/22 23:20:31 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.28 2008/01/06 01:23:36 tom Exp $")
#define stolen_lines (screen_lines - SP->_lines_avail)
}
#endif
+/*
+ * Return true if the given dimensions do not match the internal terminal
+ * structure's size.
+ */
NCURSES_EXPORT(bool)
is_term_resized(int ToLines, int ToCols)
{
|| ToCols != screen_columns));
}
+/*
+ */
+static ripoff_t *
+ripped_window(WINDOW *win)
+{
+ ripoff_t *result = 0;
+ ripoff_t *rop;
+
+ if (win != 0) {
+ for (rop = ripoff_stack; (rop - ripoff_stack) < N_RIPS; rop++) {
+ if (rop->win == win && rop->line != 0) {
+ result = rop;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+/*
+ * Returns the number of lines from the bottom for the beginning of a ripped
+ * off window.
+ */
+static int
+ripped_bottom(WINDOW *win)
+{
+ int result = 0;
+ ripoff_t *rop;
+
+ if (win != 0) {
+ for (rop = ripoff_stack; (rop - ripoff_stack) < N_RIPS; rop++) {
+ if (rop->line < 0) {
+ result -= rop->line;
+ if (rop->win == win) {
+ break;
+ }
+ }
+ }
+ }
+ return result;
+}
+
/*
* Return the number of levels of child-windows under the current window.
*/
int bottom = CurLines + SP->_topstolen - stolen;
int myLines = win->_maxy + 1;
int myCols = win->_maxx + 1;
+ ripoff_t *rop = ripped_window(win);
- T((T_CALLED("adjust_window(%p,%d,%d) currently %ldx%ld at %ld,%ld"),
+ T((T_CALLED("adjust_window(%p,%d,%d)%s depth %d/%d currently %ldx%ld at %ld,%ld"),
win, ToLines, ToCols,
+ (rop != 0) ? " (rip)" : "",
+ parent_depth(win),
+ child_depth(win),
(long) getmaxy(win), (long) getmaxx(win),
- (long) getbegy(win), (long) getbegx(win)));
-
- if (win->_begy >= bottom) {
+ (long) getbegy(win) + win->_yoffset, (long) getbegx(win)));
+
+ if (rop != 0 && rop->line < 0) {
+ /*
+ * If it is a ripped-off window at the bottom of the screen, simply
+ * move it to the same relative position.
+ */
+ win->_begy = ToLines - ripped_bottom(win) - 0 - win->_yoffset;
+ } else if (win->_begy >= bottom) {
+ /*
+ * If it is below the bottom of the new screen, move up by the same
+ * amount that the screen shrank.
+ */
win->_begy += (ToLines - CurLines);
} else {
if (myLines == CurLines - stolen
SP->_sig_winch = FALSE;
if (is_term_resized(ToLines, ToCols)) {
+#if USE_SIGWINCH
+ ripoff_t *rop;
+ bool slk_visible = (SP != 0
+ && SP->_slk != 0
+ && !(SP->_slk->hidden));
+
+ if (slk_visible) {
+ slk_clear();
+ }
+#endif
+ result = resize_term(ToLines, ToCols);
#if USE_SIGWINCH
ungetch(KEY_RESIZE); /* so application can know this */
clearok(curscr, TRUE); /* screen contents are unknown */
-#endif
- result = resize_term(ToLines, ToCols);
+ /* ripped-off lines are a special case: if we did not lengthen
+ * them, we haven't moved them either. repaint them, too.
+ */
+ for (rop = ripoff_stack; (rop - ripoff_stack) < N_RIPS; rop++) {
+ if (rop->win != stdscr
+ && rop->win != 0
+ && rop->line < 0) {
+
+ if (rop->hook != _nc_slk_initialize) {
+ touchwin(rop->win);
+ wnoutrefresh(rop->win);
+ }
+ }
+ }
+
+ /* soft-keys are a special case: we _know_ how to repaint them */
+ if (slk_visible) {
+ slk_restore();
+ slk_touch();
+
+ slk_refresh();
+ }
+#endif
}
}
/*
- * $Id: curses.priv.h,v 1.353 2007/12/23 00:15:38 tom Exp $
+ * $Id: curses.priv.h,v 1.355 2007/12/29 20:32:54 tom Exp $
*
* curses.priv.h
*
#endif /* USE_TERMLIB */
typedef struct {
+ WINDOW *win; /* the window used in the hook */
int line; /* lines to take, < 0 => from bottom*/
int (*hook)(WINDOW *, int); /* callback for user */
} ripoff_t;
#endif
} NCURSES_PRESCREEN;
+#define ripoff_sp _nc_prescreen.rsp
+#define ripoff_stack _nc_prescreen.rippedoff
+
extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_data.c,v 1.34 2007/10/20 21:49:10 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.35 2007/12/29 20:29:27 tom Exp $")
/*
* OS/2's native linker complains if we don't initialize public data when
#define STACK_FRAME_0s { STACK_FRAME_0 }
#define NUM_VARS_0s { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-#define RIPOFF_0 { 0,0 }
+#define RIPOFF_0 { 0,0,0 }
#define RIPOFF_0s { RIPOFF_0 }
NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 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 <dump_entry.h>
-MODULE_ID("$Id: infocmp.c,v 1.94 2007/11/17 23:34:26 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.95 2008/01/05 20:53:20 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
}
}
- maxterms = (argc + 1 - optind);
+ maxterms = (argc + 2 - optind);
tfile = typeMalloc(path, maxterms);
tname = typeCalloc(char *, maxterms);
entries = typeCalloc(ENTRY, maxterms);
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 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 <hashed_db.h>
#endif
-MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.48 2008/01/05 20:41:26 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
bool direct_dependencies = FALSE;
bool invert_dependencies = FALSE;
bool header = FALSE;
+ char *report_file = 0;
int i;
int code;
int this_opt, last_opt = '?';
_nc_progname = _nc_rootname(argv[0]);
- while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != -1) {
+ while ((this_opt = getopt(argc, argv, "0123456789ahu:vU:V")) != -1) {
/* handle optional parameter */
if (isdigit(this_opt)) {
switch (last_opt) {
break;
case 'u':
direct_dependencies = TRUE;
+ report_file = optarg;
break;
case 'v':
v_opt = 1;
break;
case 'U':
invert_dependencies = TRUE;
+ report_file = optarg;
break;
case 'V':
puts(curses_version());
}
set_trace_level(v_opt);
- if (direct_dependencies || invert_dependencies) {
- if (freopen(argv[optind], "r", stdin) == 0) {
+ if (report_file != 0) {
+ if (freopen(report_file, "r", stdin) == 0) {
(void) fflush(stdout);
- fprintf(stderr, "%s: can't open %s\n", _nc_progname, argv[optind]);
+ fprintf(stderr, "%s: can't open %s\n", _nc_progname, report_file);
ExitProgram(EXIT_FAILURE);
}
/* parse entries out of the source file */
- _nc_set_source(argv[optind]);
+ _nc_set_source(report_file);
_nc_read_entry_source(stdin, 0, FALSE, FALSE, NULLHOOK);
}
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.292 2007/07/21 17:41:55 tom Exp $
+$Id: ncurses.c,v 1.296 2007/12/29 21:05:43 tom Exp $
***************************************************************************/
winstack[level].frame = box_win;
}
+#if USE_SOFTKEYS && (NCURSES_VERSION_PATCH < 20071229)
+static void
+slk_repaint(void)
+{
+ /* this chunk is now done in resize_term() */
+ slk_touch();
+ slk_clear();
+ slk_noutrefresh();
+}
+
+#else
+#define slk_repaint() /* nothing */
+#endif
+
/*
* For wgetch_test(), we create pairs of windows - one for a box, one for text.
* Resize both and paint the box in the parent.
touchwin(stdscr);
wnoutrefresh(stdscr);
-#if USE_SOFTKEYS
- /* FIXME: this chunk should be done in resizeterm() */
- slk_touch();
- slk_clear();
- slk_noutrefresh();
-#endif
+ slk_repaint();
for (n = 0; n < level; ++n) {
wresize(winstack[n].frame, high, wide);
getch_test(void)
{
int delay = begin_getch_test();
+
+ slk_restore();
wgetch_test(0, stdscr, delay);
forget_boxes();
finish_getch_test();
#if USE_WIDEC_SUPPORT
/*
- * For wgetch_test(), we create pairs of windows - one for a box, one for text.
+ * For wget_wch_test(), we create pairs of windows - one for a box, one for text.
* Resize both and paint the box in the parent.
*/
#ifdef KEY_RESIZE
touchwin(stdscr);
wnoutrefresh(stdscr);
-#if USE_SOFTKEYS
- /* FIXME: this chunk should be done in resizeterm() */
- slk_touch();
- slk_clear();
- slk_noutrefresh();
-#endif
+ slk_repaint();
for (n = 0; n < level; ++n) {
wresize(winstack[n].frame, high, wide);
get_wch_test(void)
{
int delay = begin_getch_test();
+
+ slk_restore();
wget_wch_test(0, stdscr, delay);
forget_boxes();
finish_getch_test();
}
break;
#endif
+#if defined(NCURSES_VERSION) && defined(KEY_RESIZE) && HAVE_WRESIZE
+ case KEY_RESIZE:
+ break;
+#endif
default:
beep();
}
- } while
- ((c = Getchar()) != EOF);
+ } while (!isQuit(c = Getchar()));
done:
slk_clear();
call_slk_color(fg, bg);
}
break;
-
+#if defined(NCURSES_VERSION) && defined(KEY_RESIZE) && HAVE_WRESIZE
+ case KEY_RESIZE:
+ break;
+#endif
default:
beep();
}
- } while
- ((c = Getchar()) != EOF);
+ } while (!isQuit(c = Getchar()));
done:
slk_clear();
wbkgd(win, A_REVERSE);
werase(win);
wmove(win, 0, 0);
- wprintw(win, "footer: %d columns", cols);
+ wprintw(win, "footer: window %p, %d columns", win, cols);
wnoutrefresh(win);
return OK;
}
wbkgd(win, A_REVERSE);
werase(win);
wmove(win, 0, 0);
- wprintw(win, "header: %d columns", cols);
+ wprintw(win, "header: window %p, %d columns", win, cols);
wnoutrefresh(win);
return OK;
}