]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 14 Oct 2011 17:16:37 +0000 (19:16 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 14 Oct 2011 17:16:37 +0000 (19:16 +0200)
* 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.

ChangeLog
grub-core/lib/posix_wrap/ctype.h
grub-core/term/serial.c
grub-core/video/colors.c
include/grub/misc.h

index 19db47e04a3cadb8dabdca3ed81a4a759d398b80..44882054c9d53f654f7c801af49711fc122073e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-14  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * 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.
+
 2011-10-09  Robert Millan  <rmh@gnu.org>
 
        LVM support for FreeBSD and GNU/kFreeBSD.
        (grub_get_unaligned64): Likewise.
        * util/import_gcry.py (cryptolist): Add adler32.
 
+2011-10-05  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/Makefile.core.def: Eliminate rarely used emu_condition. This
+       in perspective decreases the complexity of build system and fixes
+       compilation right now.
+
 2011-10-01  Ales Nesrsta <starous@volny.cz>
 
        * grub-core/bus/usb/uhci.c: Changes made by Rock Cui - thanks!
index 2dc3e53e9dba59b05cd8c1f509edc6fe457123ae..9589778b6af340bd928b3da9d0d71def06499816 100644 (file)
@@ -54,8 +54,7 @@ isupper (int c)
 static inline int
 isxdigit (int c)
 {
-  return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')
-    || (c >= '0' && c <= '9');
+  return grub_isxdigit (c);
 }
 
 static inline int 
index b724a945a626fbd0b59afab9c66dd9f1b323c58d..306694192a430346c0f9447c24354cb92a053ebd 100644 (file)
@@ -136,7 +136,7 @@ grub_serial_find (char *name)
 
 #ifndef GRUB_MACHINE_EMU
   if (!port && grub_memcmp (name, "port", sizeof ("port") - 1) == 0
-      && grub_isdigit (name [sizeof ("port") - 1]))
+      && grub_isxdigit (name [sizeof ("port") - 1]))
     {
       name = grub_serial_ns8250_add_port (grub_strtoul (&name[sizeof ("port") - 1],
                                                        0, 16));
index 3119c0249614d6ef083961f1f53c5ceb2728d796..06625183e5518b592e067d34c62e9815f71a1c85 100644 (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++;
index da4bd4a7e43cb809fdc6e9419c5c123dcf9545e8..66e74d8a8a32b4fcdd866e55832630d514a3856e 100644 (file)
@@ -136,6 +136,12 @@ grub_isdigit (int c)
   return (c >= '0' && c <= '9');
 }
 
+static inline int
+grub_isxdigit (int c)
+{
+  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
+}
+
 static inline int
 grub_isalnum (int c)
 {