Minor cleanups in printcmd.c
authorTom Tromey <tom@tromey.com>
Fri, 27 Apr 2018 22:04:13 +0000 (16:04 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 4 May 2018 18:22:44 +0000 (12:22 -0600)
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.

gdb/ChangeLog
gdb/printcmd.c

index 7136be6690cdd1134e11f810e48bdd1a4815684f..b5e1f6e2f2668b19a1ee80bb401fb148c33f945b 100644 (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:
index 18c41103bd55b2d0c9e7adc81fa434a95ddad5fa..4696373b2cc71e5afc8599adeae31a7e12536a17 100644 (file)
 #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 == '?')
This page took 0.035766 seconds and 4 git commands to generate.