Changeset db25906 in mainline for kernel/generic/include/macros.h


Ignore:
Timestamp:
2007-10-05T05:16:18Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4e75ea
Parents:
f7fad5a
Message:

Remove duplicit implementation of strlen() in kernel, rename is_digit(),
is_white() and co. to their standard names (e.g. isdigit(), isspace()) and
remove duplicit implementation of isdigit(). Fix cstyle in kernel printf()
implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/macros.h

    rf7fad5a rdb25906  
    3838#include <arch/types.h>
    3939
    40 #define is_digit(d)     (((d) >= '0') && ((d) <= '9'))
    41 #define is_lower(c)     (((c) >= 'a') && ((c) <= 'z'))
    42 #define is_upper(c)     (((c) >= 'A') && ((c) <= 'Z'))
    43 #define is_alpha(c)     (is_lower(c) || is_upper(c))
    44 #define is_alphanum(c)  (is_alpha(c) || is_digit(c))
    45 #define is_white(c)     (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || \
     40#define isdigit(d)      (((d) >= '0') && ((d) <= '9'))
     41#define islower(c)      (((c) >= 'a') && ((c) <= 'z'))
     42#define isupper(c)      (((c) >= 'A') && ((c) <= 'Z'))
     43#define isalpha(c)      (is_lower(c) || is_upper(c))
     44#define isalphanum(c)   (is_alpha(c) || is_digit(c))
     45#define isspace(c)      (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || \
    4646                                ((c) == '\r'))
    4747
Note: See TracChangeset for help on using the changeset viewer.