Index: gdb/cli/cli-utils.h |
diff --git a/gdb/cli/cli-utils.h b/gdb/cli/cli-utils.h |
index 9fb12ba962e49c6ba89f6bd3fb0f1b011783ae02..ebae2d2b552e028c38538e1e76ae1d04f2e52e01 100644 |
--- a/gdb/cli/cli-utils.h |
+++ b/gdb/cli/cli-utils.h |
@@ -1,6 +1,6 @@ |
/* CLI utilities. |
- Copyright (c) 2011-2012 Free Software Foundation, Inc. |
+ Copyright (C) 2011-2013 Free Software Foundation, Inc. |
This file is part of GDB. |
@@ -101,7 +101,11 @@ extern const char *skip_spaces_const (const char *inp); |
/* Skip leading non-whitespace characters in INP, returning an updated |
pointer. If INP is NULL, return NULL. */ |
-extern char *skip_to_space (char *inp); |
+#define skip_to_space(INP) ((char *) skip_to_space_const (INP)) |
+ |
+/* A const-correct version of the above. */ |
+ |
+extern const char *skip_to_space_const (const char *inp); |
/* Reverse S to the last non-whitespace character without skipping past |
START. */ |
@@ -114,6 +118,13 @@ extern char *remove_trailing_whitespace (const char *start, char *s); |
extern char *extract_arg (char **arg); |
+/* A const-correct version of "extract_arg". |
+ |
+ Since the returned value is xmalloc'd, it eventually needs to be |
+ xfree'ed, which prevents us from making it const as well. */ |
+ |
+extern char *extract_arg_const (const char **arg); |
+ |
/* A helper function that looks for an argument at the start of a |
string. The argument must also either be at the end of the string, |
or be followed by whitespace. Returns 1 if it finds the argument, |