From 8fdda400ffba84f2237f400f03b784dcc95ac00e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 27 Mar 2006 14:15:54 +0000 Subject: [PATCH] Merged PDC_clr_update() into doupdate(). --- curspriv.h | 3 +-- doc/intro.man | 1 - pdcurses/pdcwin.c | 45 +------------------------------------------- pdcurses/refresh.c | 16 +++++++++++++--- win32/curses.def | 1 - win32/curses_lcc.def | 1 - 6 files changed, 15 insertions(+), 52 deletions(-) diff --git a/curspriv.h b/curspriv.h index 0c05b193..817ca04f 100644 --- a/curspriv.h +++ b/curspriv.h @@ -15,7 +15,7 @@ * See the file maintain.er for details of the current maintainer. * ************************************************************************/ -/* $Id: curspriv.h,v 1.52 2006/03/27 14:07:20 wmcbrine Exp $ */ +/* $Id: curspriv.h,v 1.53 2006/03/27 14:15:53 wmcbrine Exp $ */ /* CURSPRIV.H @@ -209,7 +209,6 @@ int PDC_chadd(WINDOW *, chtype, bool, bool); bool PDC_check_bios_key(void); int PDC_chg_attrs(WINDOW *, chtype, int, int, int, int); int PDC_chins(WINDOW *, chtype, bool); -int PDC_clr_update(void); int PDC_copy_win(const WINDOW *, WINDOW *, int, int, int, int, int, int, bool); int PDC_cursor_off(void); diff --git a/doc/intro.man b/doc/intro.man index 14cbbfa7..4afb1145 100644 --- a/doc/intro.man +++ b/doc/intro.man @@ -484,7 +484,6 @@ FUNCTIONS PDC_check_bios_key pdckbd PDC_chg_attrs pdcdisp PDC_chins pdcdisp - PDC_clr_update pdcdisp PDC_copy_win pdcwin PDC_cursor_off pdcdisp PDC_cursor_on pdcdisp diff --git a/pdcurses/pdcwin.c b/pdcurses/pdcwin.c index 0002d98c..ec6cdd6f 100644 --- a/pdcurses/pdcwin.c +++ b/pdcurses/pdcwin.c @@ -24,7 +24,7 @@ #ifdef PDCDEBUG const char *rcsid_PDCwin = - "$Id: pdcwin.c,v 1.37 2006/03/25 23:57:47 wmcbrine Exp $"; + "$Id: pdcwin.c,v 1.38 2006/03/27 14:15:54 wmcbrine Exp $"; #endif /*man-start************************************************************** @@ -621,49 +621,6 @@ int PDC_chins(WINDOW *win, chtype c, bool xlat) return PDC_chadd(win, c, xlat, FALSE); } -/*man-start************************************************************** - - PDC_clr_update() - Updates the screen with a full redraw. - - PDCurses Description: - Updates the screen by clearing it and then redrawing it in its - entirety. - - PDCurses Return Value: - This routine returns ERR if it is unable to accomplish its task. - - The return value OK is returned if there were no errors. - - PDCurses Errors: - No errors are defined for this function. - - Portability: - PDCurses int PDC_clr_update(void); - -**man-end****************************************************************/ - -int PDC_clr_update(void) -{ - int i; - - PDC_LOG(("PDC_clr_update() - called\n")); - - if (curscr == (WINDOW *)NULL) - return ERR; - - curscr->_clear = FALSE; - - for (i = 0; i < LINES; i++) /* update physical screen */ - { - curscr->_firstch[i] = 0; - curscr->_lastch[i] = COLS - 1; - - PDC_transform_line(i); - } - - return OK; -} - /*man-start************************************************************** PDC_newline() - Advances 1 newline from supplied line number. diff --git a/pdcurses/refresh.c b/pdcurses/refresh.c index 4ebd0b2e..dfeb8e9e 100644 --- a/pdcurses/refresh.c +++ b/pdcurses/refresh.c @@ -40,7 +40,7 @@ #ifdef PDCDEBUG const char *rcsid_refresh = - "$Id: refresh.c,v 1.26 2006/03/27 14:07:21 wmcbrine Exp $"; + "$Id: refresh.c,v 1.27 2006/03/27 14:15:54 wmcbrine Exp $"; #endif /*man-start************************************************************** @@ -205,7 +205,17 @@ int doupdate(void) return ERR; if (curscr->_clear) - PDC_clr_update(); + { + curscr->_clear = FALSE; + + for (i = 0; i < SP->lines; i++) + { + curscr->_firstch[i] = 0; + curscr->_lastch[i] = COLS - 1; + + PDC_transform_line(i); + } + } else for (i = 0; i < SP->lines; i++) { @@ -214,7 +224,7 @@ int doupdate(void) "Yes" : "No")); if ((curscr->_firstch[i] != _NO_CHANGE) && - PDC_transform_line(i)) /* if test new */ + PDC_transform_line(i)) break; } diff --git a/win32/curses.def b/win32/curses.def index f70e5c5e..db15a8dc 100644 --- a/win32/curses.def +++ b/win32/curses.def @@ -272,7 +272,6 @@ EXPORTS PDC_chadd EXPORTS PDC_check_bios_key EXPORTS PDC_chg_attrs EXPORTS PDC_chins -EXPORTS PDC_clr_update EXPORTS PDC_copy_win EXPORTS PDC_cursor_off EXPORTS PDC_cursor_on diff --git a/win32/curses_lcc.def b/win32/curses_lcc.def index 3fffe4b1..f7d31d81 100644 --- a/win32/curses_lcc.def +++ b/win32/curses_lcc.def @@ -265,7 +265,6 @@ PDC_chadd PDC_check_bios_key PDC_chg_attrs PDC_chins -PDC_clr_update PDC_copy_win PDC_cursor_off PDC_cursor_on