From 03aef70fecec83e109c65337a59600ad36def6bf Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 15 Jun 2015 17:04:56 +0200 Subject: Move utility functions to common/ gdb/ChangeLog 2015-06-15 Aleksandar Ristovski Move utility functions to common/. * cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const): Move defs to common/common-utils.c. * cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space) (skip_to_space_const): Move decls to common/common-utils.h. * common/common-defs.h: Move include of common-types.h before common-utils.h. * common/common-utils.c: Include host-defs.h and ctype.h. (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move from utils.c. (skip_spaces, skip_spaces_const, skip_to_space_const): Move from cli/cli-utils.c. * common/common-utils.h (strtoulst): Move decl from utils.h. (skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const): Move from cli/cli-utils.h. * common/host-defs.h: Include limits.h. (TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h. (skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h. * defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to common/common-utils.h. * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int) (strtoulst): Move to common/common-utils.c. * utils.h (strtoulst): Moved decl to common/common-utils.h. --- gdb/cli/cli-utils.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'gdb/cli/cli-utils.h') diff --git a/gdb/cli/cli-utils.h b/gdb/cli/cli-utils.h index 5e191ec..ad46581 100644 --- a/gdb/cli/cli-utils.h +++ b/gdb/cli/cli-utils.h @@ -93,24 +93,6 @@ extern int get_number_or_range (struct get_number_or_range_state *state); extern int number_is_in_list (const char *list, int number); -/* Skip leading whitespace characters in INP, returning an updated - pointer. If INP is NULL, return NULL. */ - -extern char *skip_spaces (char *inp); - -/* A const-correct version of the above. */ - -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. */ - -#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. */ -- cgit v1.1