forked from Imagelibrary/binutils-gdb
2012-07-05 Hui Zhu <hui_zhu@mentor.com>
* breakpoint.c (check_for_argument): Move to file cli/cli-utils.c. * cli/cli-utils.c (check_for_argument): New function. * cli/cli-utils.h (check_for_argument): Ditto.
This commit is contained in:
@@ -286,3 +286,17 @@ extract_arg (char **arg)
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
/* See documentation in cli-utils.h. */
|
||||
|
||||
int
|
||||
check_for_argument (char **str, char *arg, int arg_len)
|
||||
{
|
||||
if (strncmp (*str, arg, arg_len) == 0
|
||||
&& ((*str)[arg_len] == '\0' || isspace ((*str)[arg_len])))
|
||||
{
|
||||
*str += arg_len;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user