* grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.

* include/grub/misc.h (grub_isxdigit): New function.
	* grub-core/video/colors.c (my_isxdigit): Removed. All users
	switched to grub_isxdigit.
	* grub-core/term/serial.c (grub_serial_find): Fix in case of port
	number starting with a letter.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-14 19:16:37 +02:00
parent a98f4a0808
commit 0eb8ffb1f5
5 changed files with 24 additions and 12 deletions

View file

@ -211,14 +211,6 @@ grub_video_get_named_color (const char *name,
return 0;
}
static __inline int
my_isxdigit (char c)
{
return ((c >= '0' && c <= '9')
|| (c >= 'a' && c <= 'f')
|| (c >= 'A' && c <= 'F'));
}
static int
parse_hex_color_component (const char *s, unsigned start, unsigned end)
{
@ -267,7 +259,7 @@ grub_video_parse_color (const char *s, grub_video_rgba_color_t *color)
/* Count the hexits to determine the format. */
int hexits = 0;
const char *end = s;
while (my_isxdigit (*end))
while (grub_isxdigit (*end))
{
end++;
hexits++;