aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/common-utils.c12
-rw-r--r--gdb/common/common-utils.h6
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
index e75a1b9..6b10d11 100644
--- a/gdb/common/common-utils.c
+++ b/gdb/common/common-utils.c
@@ -298,7 +298,7 @@ skip_spaces (char *chp)
/* A const-correct version of the above. */
const char *
-skip_spaces_const (const char *chp)
+skip_spaces (const char *chp)
{
if (chp == NULL)
return NULL;
@@ -310,7 +310,7 @@ skip_spaces_const (const char *chp)
/* See documentation in common-utils.h. */
const char *
-skip_to_space_const (const char *chp)
+skip_to_space (const char *chp)
{
if (chp == NULL)
return NULL;
@@ -319,6 +319,14 @@ skip_to_space_const (const char *chp)
return chp;
}
+/* See documentation in common-utils.h. */
+
+char *
+skip_to_space (char *chp)
+{
+ return (char *) skip_to_space ((const char *) chp);
+}
+
/* See common/common-utils.h. */
void
diff --git a/gdb/common/common-utils.h b/gdb/common/common-utils.h
index 787bac9..6475c28 100644
--- a/gdb/common/common-utils.h
+++ b/gdb/common/common-utils.h
@@ -93,16 +93,16 @@ extern char *skip_spaces (char *inp);
/* A const-correct version of the above. */
-extern const char *skip_spaces_const (const char *inp);
+extern const char *skip_spaces (const char *inp);
/* Skip leading non-whitespace characters in INP, returning an updated
pointer. If INP is NULL, return NULL. */
-#define skip_to_space(INP) ((char *) skip_to_space_const (INP))
+extern char *skip_to_space (char *inp);
/* A const-correct version of the above. */
-extern const char *skip_to_space_const (const char *inp);
+extern const char *skip_to_space (const char *inp);
/* Assumes that V is an argv for a program, and iterates through
freeing all the elements. */