summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/tty/tty_update.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2000-01-16 01:35:17 +0000
committermillert <millert@openbsd.org>2000-01-16 01:35:17 +0000
commit6ac042424beda7bda585fd10ccc8aa68c90a995c (patch)
treea654cb60802b1628f11f37fe51881e71f2690dd0 /lib/libcurses/tty/tty_update.c
parentETHERTYPE_ATALK -> ETHERTYPE_AT (op21@squish.org) (diff)
downloadwireguard-openbsd-6ac042424beda7bda585fd10ccc8aa68c90a995c.tar.xz
wireguard-openbsd-6ac042424beda7bda585fd10ccc8aa68c90a995c.zip
Update to ncurses-5.0-20000115:
+ additional fixes for non-bce terminals (handling of delete_character) to work when assume_default_colors() is not specified. + modify warning message from _nc_parse_entry() regarding extended capability names to print only if tic/infocmp/toe have the -v flag set, and not at all in ordinary user applications. Otherwise, this warning would be shown for screen's extended capabilities in programs that use the termcap interface. + modify use of _nc_tracing from programs such as tic so their debug level is not in the same range as values set by trace() function. + small panel header cleanup (patch by Juergen Pfeifer).
Diffstat (limited to 'lib/libcurses/tty/tty_update.c')
-rw-r--r--lib/libcurses/tty/tty_update.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/lib/libcurses/tty/tty_update.c b/lib/libcurses/tty/tty_update.c
index 2df0aa2f81d..07102426eeb 100644
--- a/lib/libcurses/tty/tty_update.c
+++ b/lib/libcurses/tty/tty_update.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: tty_update.c,v 1.4 1999/11/28 17:49:55 millert Exp $ */
+/* $OpenBSD: tty_update.c,v 1.5 2000/01/16 01:35:18 millert Exp $ */
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000 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 *
@@ -75,7 +75,7 @@
#include <term.h>
-MODULE_ID("$From: tty_update.c,v 1.122 1999/11/28 03:07:38 tom Exp $")
+MODULE_ID("$From: tty_update.c,v 1.123 2000/01/15 23:49:36 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
@@ -88,6 +88,7 @@ MODULE_ID("$From: tty_update.c,v 1.122 1999/11/28 03:07:38 tom Exp $")
*/
#define CHECK_INTERVAL 5
+#define FILL_BCE() (SP->_coloron && !SP->_default_color && !back_color_erase)
/*
* Enable checking to see if doupdate and friends are tracking the true
* cursor position correctly. NOTE: this is a debugging hack which will
@@ -874,7 +875,7 @@ bool needclear = FALSE;
TPUTS_TRACE("clr_eol");
if (SP->_el_cost > (screen_columns - SP->_curscol)
#ifdef NCURSES_EXT_FUNCS
- || (SP->_coloron && !SP->_default_color && !back_color_erase)
+ || FILL_BCE()
#endif
)
{
@@ -901,7 +902,7 @@ int row, col;
col = SP->_curscol;
#ifdef NCURSES_EXT_FUNCS
- if (SP->_coloron && !SP->_default_color && !back_color_erase) {
+ if (FILL_BCE()) {
int i, j, k = col;
for (i = row; i < screen_lines; i++) {
GoTo(i, k);
@@ -1377,18 +1378,29 @@ static void InsStr(chtype *line, int count)
static void DelChar(int count)
{
+ int n;
+
T(("DelChar(%d) called, position = (%d,%d)", count, newscr->_cury, newscr->_curx));
if (parm_dch) {
TPUTS_TRACE("parm_dch");
tputs(tparm(parm_dch, count), count, _nc_outch);
} else {
- while (count--)
- {
+ for (n = 0; n < count; n++) {
TPUTS_TRACE("delete_character");
putp(delete_character);
}
}
+#ifdef NCURSES_EXT_FUNCS
+ if (FILL_BCE()) {
+ chtype blank = ClrBlank(stdscr);
+ GoTo(SP->_cursrow, screen_columns - count);
+ UpdateAttrs(blank);
+ for (n = 0; n < count; n++) {
+ PutChar(blank);
+ }
+ }
+#endif
}
/*
@@ -1492,7 +1504,7 @@ static int scroll_csr_forward(int n, int top, int bot, int miny, int maxy, chtyp
return ERR;
#ifdef NCURSES_EXT_FUNCS
- if (SP->_coloron && !SP->_default_color && !back_color_erase) {
+ if (FILL_BCE()) {
for (i = 0; i < n; i++) {
GoTo(bot-i, 0);
for (j = 0; j < screen_columns; j++)
@@ -1561,7 +1573,7 @@ static int scroll_csr_backward(int n, int top, int bot, int miny, int maxy, chty
return ERR;
#ifdef NCURSES_EXT_FUNCS
- if (SP->_coloron && !SP->_default_color && !back_color_erase) {
+ if (FILL_BCE()) {
for (i = 0; i < n; i++) {
GoTo(top+i, 0);
for (j = 0; j < screen_columns; j++)