* reverse.c: Include cli-utils.h.
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index d89004b2a609960c09609ac11154da82f8627fc8..ebca5a3142e1f6a08a11c52e7031288db68d96de 100644 (file)
@@ -50,6 +50,7 @@
 #include "charset.h"
 #include "arch-utils.h"
 #include "printcmd.h"
+#include "cli/cli-utils.h"
 
 #ifdef TUI
 #include "tui/tui.h"           /* For tui_active et al.   */
@@ -1983,9 +1984,7 @@ string_printf (char *arg, struct ui_file *stream, printf_callback callback,
   if (s == 0)
     error_no_arg (_("format-control string and values to print"));
 
-  /* Skip white space before format string.  */
-  while (*s == ' ' || *s == '\t')
-    s++;
+  s = skip_spaces (s);
 
   /* A format string should follow, enveloped in double quotes.  */
   if (*s++ != '"')
@@ -2049,16 +2048,14 @@ string_printf (char *arg, struct ui_file *stream, printf_callback callback,
   /* Skip over " and following space and comma.  */
   s++;
   *f++ = '\0';
-  while (*s == ' ' || *s == '\t')
-    s++;
+  s = skip_spaces (s);
 
   if (*s != ',' && *s != 0)
     error (_("Invalid argument syntax"));
 
   if (*s == ',')
     s++;
-  while (*s == ' ' || *s == '\t')
-    s++;
+  s = skip_spaces (s);
 
   /* Need extra space for the '\0's.  Doubling the size is sufficient.  */
   substrings = alloca (strlen (string) * 2);
This page took 0.023686 seconds and 4 git commands to generate.