diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-02-28 20:18:34 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-02-28 20:48:43 -0500 |
commit | 785ba6f4ee7677f395252daf9c1de30fb80a179d (patch) | |
tree | e6bddfba7317903a8aae4136eb0c937eea9a93fb | |
parent | 36ac433450b7e0b260e44b4320c4b6af0ba12a8f (diff) |
provide fallback for deprecated isascii/toascii
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/XawI18n.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/XawI18n.h b/src/XawI18n.h index 448c35c..7d20bfc 100644 --- a/src/XawI18n.h +++ b/src/XawI18n.h @@ -80,10 +80,16 @@ wchar_t _Xaw_atowc ); #ifndef HAS_ISW_FUNCS -#include <ctype.h> -#ifndef iswspace -#define iswspace(c) (isascii(c) && isspace(toascii(c))) -#endif +# include <ctype.h> +# ifndef isascii +# define isascii(c) ((unsigned char)(c) < 127) +# endif +# ifndef toascii +# define toascii(c) ((c) & 0x7f) +# endif +# ifndef iswspace +# define iswspace(c) (isascii(c) && isspace(toascii(c))) +# endif #endif #if !defined(iswalnum) && !defined(HAVE_ISWALNUM) |