aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-27 16:04:13 -0600
committerTom Tromey <tom@tromey.com>2018-05-04 12:22:44 -0600
commit2f433492bd9dd3af10aab8d92dc0bfbf8ff6c5e8 (patch)
treef4ad8e086a98aecea3977d420407faef9b3fc25d /gdb/printcmd.c
parentUse previous count when 'x' command is repeated (diff)
downloadbinutils-gdb-2f433492bd9dd3af10aab8d92dc0bfbf8ff6c5e8.tar.gz
binutils-gdb-2f433492bd9dd3af10aab8d92dc0bfbf8ff6c5e8.tar.bz2
binutils-gdb-2f433492bd9dd3af10aab8d92dc0bfbf8ff6c5e8.zip
Minor cleanups in printcmd.c
This changes decode_format to use skip_spaces, and changes printcmd.c not to include tui.h, which apparently is not needed. 2018-05-04 Tom Tromey <tom@tromey.com> * printcmd.c: Don't include tui.h. (decode_format): Use skip_spaces.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 18c41103bd5..4696373b2cc 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 == '?')