mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-16 23:06:48 +08:00
Make check_for_argument skip whitespace after arg itself
Basically every caller of check_for_argument needs to skip space after the argument. This patch makes check_for_argument do it itself. Suggested by Philippe Waroquiers. gdb/ChangeLog: 2019-06-13 Pedro Alves <palves@redhat.com> * ax-gdb.c (agent_command_1): Remove skip_spaces call. * breakpoint.c (watch_maybe_just_location): Remove skip_spaces call. * cli/cli-cmds.c (apropos_command): Remove skip_spaces call. * cli/cli-utils.c (extract_info_print_args): Remove skip_spaces calls. (check_for_argument): Skip spaces after argument.
This commit is contained in:
@ -188,7 +188,9 @@ extern std::string extract_arg (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,
|
||||
0 otherwise. If the argument is found, it updates *STR. */
|
||||
0 otherwise. If the argument is found, it updates *STR to point
|
||||
past the argument and past any whitespace following the
|
||||
argument. */
|
||||
extern int check_for_argument (const char **str, const char *arg, int arg_len);
|
||||
|
||||
/* Same, for non-const STR. */
|
||||
|
Reference in New Issue
Block a user