This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 2/2] Minor cleanups in printcmd.c
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Mon, 30 Apr 2018 14:26:26 -0600
- Subject: [RFA 2/2] Minor cleanups in printcmd.c
- References: <20180430202626.27017-1-tom@tromey.com>
This changes decode_format to use skip_spaces, and changes printcmd.c
not to include tui.h, which apparently is not needed.
ChangeLog
2018-04-30 Tom Tromey <tom@tromey.com>
* printcmd.c: Don't include tui.h.
(decode_format): Use skip_spaces.
---
gdb/ChangeLog | 5 +++++
gdb/printcmd.c | 8 +-------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 18c41103bd..4696373b2c 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -50,10 +50,6 @@
#include "source.h"
#include "common/byte-vector.h"
-#ifdef TUI
-#include "tui/tui.h" /* For tui_active et al. */
-#endif
-
/* Last specified output format. */
static char last_format = 0;
@@ -215,9 +211,7 @@ decode_format (const char **string_ptr, int oformat, int osize)
break;
}
- while (*p == ' ' || *p == '\t')
- p++;
- *string_ptr = p;
+ *string_ptr = skip_spaces (p);
/* Set defaults for format and size if not specified. */
if (val.format == '?')
--
2.13.6