diff options
author | Jim Meyering <jim@meyering.net> | 1999-05-03 17:59:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-05-03 17:59:43 +0000 |
commit | 85514c7e0bb1c4b65fd3ec677f7f264f29acf3fd (patch) | |
tree | 49a4aef8c0706a27ed0c8e7544593b9c55009e15 /src | |
parent | e060631c35c85acecf1884c24560066c20fc4c97 (diff) | |
download | coreutils-85514c7e0bb1c4b65fd3ec677f7f264f29acf3fd.tar.xz |
(TOLOWER): Define.
(TOUPPER): Define.
Diffstat (limited to 'src')
-rw-r--r-- | src/sys2.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sys2.h b/src/sys2.h index a58e94826..bd367800e 100644 --- a/src/sys2.h +++ b/src/sys2.h @@ -62,7 +62,7 @@ char *alloca (); character >= 128 which gets sign-extended to a negative value. The macro ISUPPER protects against this as well." */ -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) +#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) @@ -90,6 +90,14 @@ char *alloca (); #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) +#if STDC_HEADERS +# define TOLOWER(Ch) tolower (Ch) +# define TOUPPER(Ch) toupper (Ch) +#else +# define TOLOWER(Ch) (ISUPPER (Ch) ? tolower (Ch) : (Ch)) +# define TOUPPER(Ch) (ISLOWER (Ch) ? toupper (Ch) : (Ch)) +#endif + /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. |