diff options
author | 1999-01-31 20:17:05 +0000 | |
---|---|---|
committer | 1999-01-31 20:17:05 +0000 | |
commit | d9df8399592011f8a1bdca2fd7001b2312e7fc50 (patch) | |
tree | 0827c17f69e9344d83aa514f447da76d2ce86310 /lib/libcurses/tty/tty_update.c | |
parent | When adjusting units for -h mode, use the absolute value to check for (diff) | |
download | wireguard-openbsd-d9df8399592011f8a1bdca2fd7001b2312e7fc50.tar.xz wireguard-openbsd-d9df8399592011f8a1bdca2fd7001b2312e7fc50.zip |
ncurses-4.2-990130
Diffstat (limited to 'lib/libcurses/tty/tty_update.c')
-rw-r--r-- | lib/libcurses/tty/tty_update.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/lib/libcurses/tty/tty_update.c b/lib/libcurses/tty/tty_update.c index 9fd81963b5e..503b63c654d 100644 --- a/lib/libcurses/tty/tty_update.c +++ b/lib/libcurses/tty/tty_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_update.c,v 1.1 1999/01/18 19:10:27 millert Exp $ */ +/* $OpenBSD: tty_update.c,v 1.2 1999/01/31 20:17:10 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -77,7 +77,7 @@ #include <term.h> -MODULE_ID("$From: tty_update.c,v 1.109 1998/10/03 19:08:33 tom Exp $") +MODULE_ID("$From: tty_update.c,v 1.110 1999/01/31 01:45:37 Alexander.V.Lukyanov Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -101,7 +101,7 @@ static inline chtype ClrBlank ( WINDOW *win ); static int ClrBottom(int total); static int InsStr( chtype *line, int count ); static void ClearScreen( chtype blank ); -static void ClrUpdate( WINDOW *win ); +static void ClrUpdate( void ); static void DelChar( int count ); static void TransformLine( int const lineno ); @@ -682,19 +682,11 @@ struct tms before, after; #endif /* USE_XMC_SUPPORT */ nonempty = 0; - if (curscr->_clear) { /* force refresh ? */ - /* yes, clear all & update */ - T(("clearing and updating curscr")); - if (is_wintouched(newscr)) - ClrUpdate(newscr); - else - ClrUpdate(curscr); + if (curscr->_clear || newscr->_clear) { /* force refresh ? */ + T(("clearing and updating from scratch")); + ClrUpdate(); curscr->_clear = FALSE; /* reset flag */ newscr->_clear = FALSE; /* reset flag */ - } else if (newscr->_clear) { - T(("clearing and updating newscr")); - ClrUpdate(newscr); - newscr->_clear = FALSE; } else { int changedlines = CHECK_INTERVAL; @@ -802,29 +794,20 @@ chtype blank = BLANK; } /* -** ClrUpdate(win) +** ClrUpdate() ** ** Update by clearing and redrawing the entire screen. ** */ -static void ClrUpdate(WINDOW *win) +static void ClrUpdate(void) { int i; - chtype blank = ClrBlank(win); + chtype blank = ClrBlank(stdscr); int nonempty = min(screen_lines, newscr->_maxy+1); T(("ClrUpdate() called")); - if (win == curscr) { - /* discard updates */ - for (i = 0; i < screen_lines ; i++) { - memcpy( newscr->_line[i].text, - curscr->_line[i].text, - screen_columns * sizeof(chtype)); - } - } - ClearScreen(blank); T(("updating screen from scratch")); |