mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
6238b47b58
It is a subset of <ctype.h> functionality, so name it ctype.h. Also, reorganize header files so #include statements are clustered near the top as they should be. Signed-off-by: H. Peter Anvin <hpa@zytor.com> LKML-Reference: <4C5752F2.8030206@kernel.org>
21 lines
289 B
C
21 lines
289 B
C
#ifndef BOOT_ISDIGIT_H
|
|
|
|
#define BOOT_ISDIGIT_H
|
|
|
|
static inline int isdigit(int ch)
|
|
{
|
|
return (ch >= '0') && (ch <= '9');
|
|
}
|
|
|
|
static inline int isxdigit(int ch)
|
|
{
|
|
if (isdigit(ch))
|
|
return true;
|
|
|
|
if ((ch >= 'a') && (ch <= 'f'))
|
|
return true;
|
|
|
|
return (ch >= 'A') && (ch <= 'F');
|
|
}
|
|
|
|
#endif
|