mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[libc] Fix isdigit(), islower() and isupper().
From: Stefan Hajnoczi <stefanha@gmail.com>
This commit is contained in:
@@ -6,10 +6,9 @@
|
||||
* Character types
|
||||
*/
|
||||
|
||||
#define isdigit(c) ((c & 0x04) != 0)
|
||||
#define islower(c) ((c & 0x02) != 0)
|
||||
//#define isspace(c) ((c & 0x20) != 0)
|
||||
#define isupper(c) ((c & 0x01) != 0)
|
||||
#define isdigit(c) ((c) >= '0' && (c) <= '9')
|
||||
#define islower(c) ((c) >= 'a' && (c) <= 'z')
|
||||
#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
|
||||
|
||||
static inline unsigned char tolower(unsigned char c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user