diff options
| author | Daniel C. Sobral <dcs@FreeBSD.org> | 2001-05-14 16:49:20 +0000 |
|---|---|---|
| committer | Daniel C. Sobral <dcs@FreeBSD.org> | 2001-05-14 16:49:20 +0000 |
| commit | 1d7d62d1e052423f38760909ebb441f25bc24723 (patch) | |
| tree | 892da237bc0d6cd427aefaeefbe133e8b5ecb8d9 /lib | |
| parent | 97f6754ff1e87a13793c5f5c7a7a7080cfb5e9be (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libstand/stand.h | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 8d39e46d6c4a..72b9a805f146 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -175,14 +175,42 @@ extern struct open_file files[]; #define F_RAW 0x0004 /* raw device open - no file system */ #define F_NODEV 0x0008 /* network open - no device */ -#define isupper(c) ((c) >= 'A' && (c) <= 'Z') -#define islower(c) ((c) >= 'a' && (c) <= 'z') -#define isspace(c) ((c) == ' ' || ((c) >= 0x9 && (c) <= 0xd)) -#define isdigit(c) ((c) >= '0' && (c) <= '9') -#define isxdigit(c) (isdigit(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) #define isascii(c) (((c) & ~0x7F) == 0) -#define isalpha(c) (isupper(c) || (islower(c))) -#define isalnum(c) (isalpha(c) || isdigit(c)) + +static __inline int isupper(int c) +{ + return c >= 'A' && c <= 'Z'; +} + +static __inline int islower(int c) +{ + return c >= 'a' && c <= 'z'; +} + +static __inline int isspace(int c) +{ + return c == ' ' || (c >= 0x9 && c <= 0xd); +} + +static __inline int isdigit(int c) +{ + return c >= '0' && c <= '9'; +} + +static __inline int isxdigit(int c) +{ + return isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); +} + +static __inline int isalpha(int c) +{ + return isupper(c) || islower(c); +} + +static __inline int isalnum(int c) +{ + return isalpha(c) || isdigit(c); +} static __inline int toupper(int c) { |
