This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Use wclrtoeol to optimize and clear the TUI status line
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 25 Aug 2002 13:55:49 +0200
- Subject: [PATCH]: Use wclrtoeol to optimize and clear the TUI status line
Hi!
This patch cleans up and optimizes the update and refresh of TUI status line
by using wclrtoeol(). I've committed it on mainline.
Stephane
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
* tuiStack.h (tuiClearLocatorDisplay): Don't declare.
* tuiStack.c (tuiClearLocatorDisplay): Remove.
(tuiShowLocatorContent): Use wclrtoeol to clear end of status line.
(tuiUpdateLocatorDisplay): Don't call tuiClearLocatorDisplay.
Index: tuiStack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiStack.c,v
retrieving revision 1.15
diff -u -p -r1.15 tuiStack.c
--- tuiStack.c 25 Aug 2002 09:40:32 -0000 1.15
+++ tuiStack.c 25 Aug 2002 09:51:59 -0000
@@ -95,35 +95,6 @@ tui_get_function_from_frame (struct fram
}
/*
- ** tuiClearLocatorDisplay()
- */
-void
-tuiClearLocatorDisplay (void)
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- int i;
-
- if (locator->handle != (WINDOW *) NULL)
- {
- /* No need to werase, since writing a line of
- * blanks which we do below, is equivalent.
- */
- /* werase(locator->handle); */
- wmove (locator->handle, 0, 0);
- wstandout (locator->handle);
- for (i = 0; i < locator->width; i++)
- waddch (locator->handle, ' ');
- wstandend (locator->handle);
- tuiRefreshWin (locator);
- wmove (locator->handle, 0, 0);
- locator->contentInUse = FALSE;
- }
-
- return;
-} /* tuiClearLocatorDisplay */
-
-
-/*
** tuiShowLocatorContent()
*/
void
@@ -142,6 +113,7 @@ tuiShowLocatorContent (void)
wmove (locator->handle, 0, 0);
wstandout (locator->handle);
waddstr (locator->handle, string);
+ wclrtoeol (locator->handle);
wstandend (locator->handle);
tuiRefreshWin (locator);
wmove (locator->handle, 0, 0);
@@ -314,7 +286,6 @@ tuiSetLocatorContent (struct frame_info
void
tuiUpdateLocatorDisplay (struct frame_info *frameInfo)
{
- tuiClearLocatorDisplay ();
tuiSetLocatorContent (frameInfo);
tuiShowLocatorContent ();
Index: tuiStack.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiStack.h,v
retrieving revision 1.7
diff -u -p -r1.7 tuiStack.h
--- tuiStack.h 23 Jul 2001 21:13:57 -0000 1.7
+++ tuiStack.h 25 Aug 2002 09:51:59 -0000
@@ -1,5 +1,5 @@
/* TUI display locator.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
This file is part of GDB.
@@ -34,7 +34,6 @@ extern void tuiUpdateLocatorDisplay (str
extern void tuiSetLocatorContent (struct frame_info *);
extern void tuiShowLocatorContent (void);
extern void tuiClearLocatorContent (void);
-extern void tuiClearLocatorDisplay (void);
extern void tuiSwitchFilename (char *);
extern void tuiShowFrameInfo (struct frame_info *);
extern void tuiGetLocatorFilename (TuiGenWinInfoPtr, char **);