Change rune-specific #defines from _CTYPE_ prefix to _RUNETYPE_ prefix
authorjca <jca@openbsd.org>
Sun, 4 Feb 2024 12:46:01 +0000 (12:46 +0000)
committerjca <jca@openbsd.org>
Sun, 4 Feb 2024 12:46:01 +0000 (12:46 +0000)
Similar to what NetBSD did around 2010, this lets us move some defines
in ctype.h to the _CTYPE_ prefix.  No functional change.

"makes sense" deraadt, ok sthen@ tb@

lib/libc/locale/iswctype.c
lib/libc/locale/iswctype_l.c
lib/libc/locale/rune.h
lib/libc/locale/runetable.c
lib/libc/locale/wctype.c

index ea7cd31..6cd92fe 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: iswctype.c,v 1.8 2022/07/25 21:38:24 guenther Exp $ */
+/*     $OpenBSD: iswctype.c,v 1.9 2024/02/04 12:46:01 jca Exp $ */
 /*     $NetBSD: iswctype.c,v 1.15 2005/02/09 21:35:46 kleink Exp $     */
 
 /*
@@ -80,75 +80,75 @@ __tolower_w(wint_t c)
 int
 iswalnum(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_A|_CTYPE_D));
+       return (__isctype_w((c), _RUNETYPE_A|_RUNETYPE_D));
 }
 
 int
 iswalpha(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_A));
+       return (__isctype_w((c), _RUNETYPE_A));
 }
 
 int
 iswblank(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_B));
+       return (__isctype_w((c), _RUNETYPE_B));
 }
 
 int
 iswcntrl(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_C));
+       return (__isctype_w((c), _RUNETYPE_C));
 }
 
 int
 iswdigit(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_D));
+       return (__isctype_w((c), _RUNETYPE_D));
 }
 
 int
 iswgraph(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_G));
+       return (__isctype_w((c), _RUNETYPE_G));
 }
 
 int
 iswlower(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_L));
+       return (__isctype_w((c), _RUNETYPE_L));
 }
 
 int
 iswprint(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_R));
+       return (__isctype_w((c), _RUNETYPE_R));
 }
 
 int
 iswpunct(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_P));
+       return (__isctype_w((c), _RUNETYPE_P));
 }
 
 int
 iswspace(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_S));
+       return (__isctype_w((c), _RUNETYPE_S));
 }
 DEF_STRONG(iswspace);
 
 int
 iswupper(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_U));
+       return (__isctype_w((c), _RUNETYPE_U));
 }
 DEF_STRONG(iswupper);
 
 int
 iswxdigit(wint_t c)
 {
-       return (__isctype_w((c), _CTYPE_X));
+       return (__isctype_w((c), _RUNETYPE_X));
 }
 
 wint_t
@@ -167,8 +167,9 @@ DEF_STRONG(towlower);
 int
 wcwidth(wchar_t c)
 {
-       if (__isctype_w((c), _CTYPE_R))
-               return (((unsigned)__runetype_w(c) & _CTYPE_SWM) >> _CTYPE_SWS);
+       if (__isctype_w((c), _RUNETYPE_R))
+               return (((unsigned)__runetype_w(c) & _RUNETYPE_SWM) >>
+                   _RUNETYPE_SWS);
        return -1;
 }
 DEF_WEAK(wcwidth);
index 2fc9d7d..a459abb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: iswctype_l.c,v 1.2 2022/07/25 21:38:24 guenther Exp $ */
+/*     $OpenBSD: iswctype_l.c,v 1.3 2024/02/04 12:46:01 jca Exp $ */
 /*     $NetBSD: iswctype.c,v 1.15 2005/02/09 21:35:46 kleink Exp $ */
 
 /*
@@ -82,73 +82,73 @@ __isctype_wl(wint_t c, _RuneType f, locale_t locale)
 int
 iswalnum_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_A|_CTYPE_D, locale);
+       return __isctype_wl(c, _RUNETYPE_A|_RUNETYPE_D, locale);
 }
 
 int
 iswalpha_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_A, locale);
+       return __isctype_wl(c, _RUNETYPE_A, locale);
 }
 
 int
 iswblank_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_B, locale);
+       return __isctype_wl(c, _RUNETYPE_B, locale);
 }
 
 int
 iswcntrl_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_C, locale);
+       return __isctype_wl(c, _RUNETYPE_C, locale);
 }
 
 int
 iswdigit_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_D, locale);
+       return __isctype_wl(c, _RUNETYPE_D, locale);
 }
 
 int
 iswgraph_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_G, locale);
+       return __isctype_wl(c, _RUNETYPE_G, locale);
 }
 
 int
 iswlower_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_L, locale);
+       return __isctype_wl(c, _RUNETYPE_L, locale);
 }
 
 int
 iswprint_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_R, locale);
+       return __isctype_wl(c, _RUNETYPE_R, locale);
 }
 
 int
 iswpunct_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_P, locale);
+       return __isctype_wl(c, _RUNETYPE_P, locale);
 }
 
 int
 iswspace_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_S, locale);
+       return __isctype_wl(c, _RUNETYPE_S, locale);
 }
 
 int
 iswupper_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_U, locale);
+       return __isctype_wl(c, _RUNETYPE_U, locale);
 }
 
 int
 iswxdigit_l(wint_t c, locale_t locale)
 {
-       return __isctype_wl(c, _CTYPE_X, locale);
+       return __isctype_wl(c, _RUNETYPE_X, locale);
 }
 
 wint_t
index f10db48..18b0775 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rune.h,v 1.4 2017/09/05 03:16:13 schwarze Exp $ */
+/*     $OpenBSD: rune.h,v 1.5 2024/02/04 12:46:01 jca Exp $ */
 /*     $NetBSD: rune.h,v 1.9 2003/08/07 16:43:04 agc Exp $     */
 
 /*-
 #define        _LOCALE_C       (locale_t)1
 #define        _LOCALE_UTF8    (locale_t)2
 
-/*
- * map _RTYPE_x to _CTYPE_x
- *
- * XXX: these should be defined in ctype.h and used in isxxx macros.
- *      (note: current isxxx macros use "old" NetBSD masks and
- *       _CTYPE_x are not public.)
- */
-#define        _CTYPE_A        _RUNETYPE_A
-#define        _CTYPE_C        _RUNETYPE_C
-#define        _CTYPE_D        _RUNETYPE_D
-#define        _CTYPE_G        _RUNETYPE_G
-#define        _CTYPE_L        _RUNETYPE_L
-#define        _CTYPE_P        _RUNETYPE_P
-#define        _CTYPE_S        _RUNETYPE_S
-#define        _CTYPE_U        _RUNETYPE_U
-#define        _CTYPE_X        _RUNETYPE_X
-#define        _CTYPE_B        _RUNETYPE_B
-#define        _CTYPE_R        _RUNETYPE_R
-#define        _CTYPE_I        _RUNETYPE_I
-#define        _CTYPE_T        _RUNETYPE_T
-#define        _CTYPE_Q        _RUNETYPE_Q
-#define        _CTYPE_SWM      _RUNETYPE_SWM
-#define        _CTYPE_SWS      _RUNETYPE_SWS
-#define        _CTYPE_SW0      _RUNETYPE_SW0
-#define        _CTYPE_SW1      _RUNETYPE_SW1
-#define        _CTYPE_SW2      _RUNETYPE_SW2
-#define        _CTYPE_SW3      _RUNETYPE_SW3
-
 __BEGIN_HIDDEN_DECLS
 extern _RuneLocale      _DefaultRuneLocale;
 extern _RuneLocale     *_Utf8RuneLocale;
index 6adc163..0990fe5 100644 (file)
@@ -48,134 +48,134 @@ _RuneLocale _DefaultRuneLocale = {
     "NONE",
     _DEFAULT_INVALID_RUNE,
 
-    {  /*00*/  _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-       /*08*/  _CTYPE_C,
-               _CTYPE_C|_CTYPE_S|_CTYPE_B,
-               _CTYPE_C|_CTYPE_S,
-               _CTYPE_C|_CTYPE_S,
-               _CTYPE_C|_CTYPE_S,
-               _CTYPE_C|_CTYPE_S,
-               _CTYPE_C,
-               _CTYPE_C,
-       /*10*/  _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-       /*18*/  _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-               _CTYPE_C,
-       /*20*/  _CTYPE_S|_CTYPE_B|_CTYPE_R|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-       /*28*/  _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-       /*30*/  _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|0,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|1,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|2,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|3,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|4,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|5,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|6,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|7,
-       /*38*/  _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|8,
-               _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|9,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-       /*40*/  _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|10,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|11,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|12,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|13,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|14,
-               _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|15,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*48*/  _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*50*/  _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*58*/  _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-       /*60*/  _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|10,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|11,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|12,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|13,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|14,
-               _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|15,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*68*/  _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*70*/  _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-       /*78*/  _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1,
-               _CTYPE_C,
+    {  /*00*/  _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+       /*08*/  _RUNETYPE_C,
+               _RUNETYPE_C|_RUNETYPE_S|_RUNETYPE_B,
+               _RUNETYPE_C|_RUNETYPE_S,
+               _RUNETYPE_C|_RUNETYPE_S,
+               _RUNETYPE_C|_RUNETYPE_S,
+               _RUNETYPE_C|_RUNETYPE_S,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+       /*10*/  _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+       /*18*/  _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+               _RUNETYPE_C,
+       /*20*/  _RUNETYPE_S|_RUNETYPE_B|_RUNETYPE_R|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+       /*28*/  _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+       /*30*/  _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|0,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|1,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|2,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|3,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|4,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|5,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|6,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|7,
+       /*38*/  _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|8,
+               _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_X|_RUNETYPE_SW1|9,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+       /*40*/  _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|10,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|11,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|12,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|13,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|14,
+               _RUNETYPE_U|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|15,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*48*/  _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*50*/  _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*58*/  _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+       /*60*/  _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|10,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|11,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|12,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|13,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|14,
+               _RUNETYPE_L|_RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1|15,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*68*/  _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*70*/  _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+       /*78*/  _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_A|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G|_RUNETYPE_SW1,
+               _RUNETYPE_C,
     },
     {  0x00,   0x01,   0x02,   0x03,   0x04,   0x05,   0x06,   0x07,
        0x08,   0x09,   0x0a,   0x0b,   0x0c,   0x0d,   0x0e,   0x0f,
index b6c432c..5e2fe78 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: wctype.c,v 1.1 2022/07/25 21:38:24 guenther Exp $ */
+/*     $OpenBSD: wctype.c,v 1.2 2024/02/04 12:46:01 jca Exp $ */
 /*     $NetBSD: iswctype.c,v 1.15 2005/02/09 21:35:46 kleink Exp $     */
 
 /*
 
 static struct _WCTypeEntry wctype_entries[_WCTYPE_NINDEXES] =
 {
-       { "alnum", _CTYPE_A|_CTYPE_D },
-       { "alpha", _CTYPE_A },
-       { "blank", _CTYPE_B },
-       { "cntrl", _CTYPE_C },
-       { "digit", _CTYPE_D },
-       { "graph", _CTYPE_G },
-       { "lower", _CTYPE_L },
-       { "print", _CTYPE_R },
-       { "punct", _CTYPE_P },
-       { "space", _CTYPE_S },
-       { "upper", _CTYPE_U },
-       { "xdigit", _CTYPE_X },
+       { "alnum", _RUNETYPE_A|_RUNETYPE_D },
+       { "alpha", _RUNETYPE_A },
+       { "blank", _RUNETYPE_B },
+       { "cntrl", _RUNETYPE_C },
+       { "digit", _RUNETYPE_D },
+       { "graph", _RUNETYPE_G },
+       { "lower", _RUNETYPE_L },
+       { "print", _RUNETYPE_R },
+       { "punct", _RUNETYPE_P },
+       { "space", _RUNETYPE_S },
+       { "upper", _RUNETYPE_U },
+       { "xdigit", _RUNETYPE_X },
 };
 
 wctype_t