Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: gdb/cli/cli-utils.h

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/cli/cli-setshow.c ('k') | gdb/cli/cli-utils.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « gdb/cli/cli-setshow.c ('k') | gdb/cli/cli-utils.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698