+2012-01-04 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c: #include "cli/cli-utils.h".
+ (get_selections): Use skip_spaces.
+ (ada_get_next_arg): Use skip_spaces and skip_to_space.
+ (catch_ada_exception_command_split): Use skip_spaces.
+ (ada_decode_assert_location): Likewise.
+
2012-01-04 Joel Brobecker <brobecker@adacore.com>
* linespec.c (decode_line_internal): Check for C++ or Java
#include "mi/mi-common.h"
#include "arch-utils.h"
#include "exceptions.h"
+#include "cli/cli-utils.h"
/* Define whether or not the C operator '/' truncates towards zero for
differently signed operands (truncation direction is undefined in C).
char *args2;
int choice, j;
- while (isspace (*args))
- args += 1;
+ args = skip_spaces (args);
if (*args == '\0' && n_chosen == 0)
error_no_arg (_("one or more choice numbers"));
else if (*args == '\0')
char *end;
char *result;
- /* Skip any leading white space. */
-
- while (isspace (*args))
- args++;
-
+ args = skip_spaces (args);
if (args[0] == '\0')
return NULL; /* No more arguments. */
/* Find the end of the current argument. */
- end = args;
- while (*end != '\0' && !isspace (*end))
- end++;
+ end = skip_to_space (args);
/* Adjust ARGSP to point to the start of the next argument. */
/* Check that we do not have any more arguments. Anything else
is unexpected. */
- while (isspace (*args))
- args++;
+ args = skip_spaces (args);
if (args[0] != '\0')
error (_("Junk at end of expression"));
if (args != NULL)
{
- while (isspace (*args))
- args++;
+ args = skip_spaces (args);
if (*args != '\0')
error (_("Junk at end of arguments."));
}