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.
This commit is contained in:
Tom Tromey 2018-04-27 16:04:13 -06:00
parent 9be2ae8fc6
commit 2f433492bd
2 changed files with 6 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2018-05-04 Tom Tromey <tom@tromey.com>
* printcmd.c: Don't include tui.h.
(decode_format): Use skip_spaces.
2018-05-04 Tom Tromey <tom@tromey.com>
PR gdb/22619:

View File

@ -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 == '?')