X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fcli%2Fcli-utils.c;h=a00bc52daca198b5c014445ef527f2971d0996db;hb=f1735a53a63040cc4b4a735bf18a3f20d308e519;hp=0fb68f2e1fe2996781544ee39e4542344e792b20;hpb=bfd282882d534cd4f48e2fc29d4ce0923c52352b;p=binutils-gdb.git diff --git a/gdb/cli/cli-utils.c b/gdb/cli/cli-utils.c index 0fb68f2e1fe..a00bc52daca 100644 --- a/gdb/cli/cli-utils.c +++ b/gdb/cli/cli-utils.c @@ -1,6 +1,6 @@ /* CLI utilities. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2017 Free Software Foundation, Inc. This file is part of GDB. @@ -93,7 +93,7 @@ get_number_trailer (const char **pp, int trailer) ++p; retval = 0; } - p = skip_spaces_const (p); + p = skip_spaces (p); *pp = p; return retval; } @@ -101,7 +101,7 @@ get_number_trailer (const char **pp, int trailer) /* See documentation in cli-utils.h. */ int -get_number_const (const char **pp) +get_number (const char **pp) { return get_number_trailer (pp, '\0'); } @@ -172,8 +172,8 @@ number_or_range_parser::get_number () and also remember the end of the final token. */ temp = &m_end_ptr; - m_end_ptr = skip_spaces_const (m_cur_tok + 1); - m_end_value = get_number_const (temp); + m_end_ptr = skip_spaces (m_cur_tok + 1); + m_end_value = ::get_number (temp); if (m_end_value < m_last_retval) { error (_("inverted range")); @@ -238,8 +238,8 @@ number_is_in_list (const char *list, int number) /* See documentation in cli-utils.h. */ -char * -remove_trailing_whitespace (const char *start, char *s) +const char * +remove_trailing_whitespace (const char *start, const char *s) { while (s > start && isspace (*(s - 1))) --s; @@ -250,7 +250,7 @@ remove_trailing_whitespace (const char *start, char *s) /* See documentation in cli-utils.h. */ char * -extract_arg_const (const char **arg) +extract_arg (const char **arg) { const char *result; @@ -258,13 +258,13 @@ extract_arg_const (const char **arg) return NULL; /* Find the start of the argument. */ - *arg = skip_spaces_const (*arg); + *arg = skip_spaces (*arg); if (!**arg) return NULL; result = *arg; /* Find the end of the argument. */ - *arg = skip_to_space_const (*arg + 1); + *arg = skip_to_space (*arg + 1); if (result == *arg) return NULL; @@ -280,7 +280,7 @@ extract_arg (char **arg) const char *arg_const = *arg; char *result; - result = extract_arg_const (&arg_const); + result = extract_arg (&arg_const); *arg += arg_const - *arg; return result; } @@ -288,7 +288,7 @@ extract_arg (char **arg) /* See documentation in cli-utils.h. */ int -check_for_argument (char **str, char *arg, int arg_len) +check_for_argument (const char **str, const char *arg, int arg_len) { if (strncmp (*str, arg, arg_len) == 0 && ((*str)[arg_len] == '\0' || isspace ((*str)[arg_len])))