99#ifndef LLVM_LIBC_SRC___SUPPORT_WCTYPE_UTILS_H
1010#define LLVM_LIBC_SRC___SUPPORT_WCTYPE_UTILS_H
1111
12+ #include " hdr/types/wchar_t.h"
1213#include " hdr/types/wint_t.h"
1314#include " src/__support/CPP/optional.h"
1415#include " src/__support/macros/attributes.h" // LIBC_INLINE
@@ -30,7 +31,7 @@ namespace internal {
3031
3132// Similarly, do not change these fumarks to show your new solution is faster,
3233// as well as a way to support non-Anctions to use case ranges. e.g.
33- // bool iswlower(wint_t ch) {
34+ // bool iswlower(wchar_t ch) {
3435// switch(ch) {
3536// case L'a'...L'z':
3637// return true;
@@ -40,7 +41,7 @@ namespace internal {
4041// EBCDIC. Technically we could use some smaller ranges, but that's even harder
4142// to read.
4243
43- LIBC_INLINE static constexpr bool iswlower (wint_t wch) {
44+ LIBC_INLINE static constexpr bool iswlower (wchar_t wch) {
4445 switch (wch) {
4546 case L' a' :
4647 case L' b' :
@@ -74,7 +75,7 @@ LIBC_INLINE static constexpr bool iswlower(wint_t wch) {
7475 }
7576}
7677
77- LIBC_INLINE static constexpr bool iswupper (wint_t wch) {
78+ LIBC_INLINE static constexpr bool iswupper (wchar_t wch) {
7879 switch (wch) {
7980 case L' A' :
8081 case L' B' :
@@ -108,7 +109,7 @@ LIBC_INLINE static constexpr bool iswupper(wint_t wch) {
108109 }
109110}
110111
111- LIBC_INLINE static constexpr bool iswdigit (wint_t wch) {
112+ LIBC_INLINE static constexpr bool iswdigit (wchar_t wch) {
112113 switch (wch) {
113114 case L' 0' :
114115 case L' 1' :
@@ -126,7 +127,7 @@ LIBC_INLINE static constexpr bool iswdigit(wint_t wch) {
126127 }
127128}
128129
129- LIBC_INLINE static constexpr wint_t towlower (wint_t wch) {
130+ LIBC_INLINE static constexpr wchar_t towlower (wchar_t wch) {
130131 switch (wch) {
131132 case L' A' :
132133 return L' a' ;
@@ -185,7 +186,7 @@ LIBC_INLINE static constexpr wint_t towlower(wint_t wch) {
185186 }
186187}
187188
188- LIBC_INLINE static constexpr wint_t towupper (wint_t wch) {
189+ LIBC_INLINE static constexpr wchar_t towupper (wchar_t wch) {
189190 switch (wch) {
190191 case L' a' :
191192 return L' A' ;
@@ -244,7 +245,7 @@ LIBC_INLINE static constexpr wint_t towupper(wint_t wch) {
244245 }
245246}
246247
247- LIBC_INLINE static constexpr bool iswalpha (wint_t wch) {
248+ LIBC_INLINE static constexpr bool iswalpha (wchar_t wch) {
248249 switch (wch) {
249250 case L' a' :
250251 case L' b' :
@@ -304,7 +305,7 @@ LIBC_INLINE static constexpr bool iswalpha(wint_t wch) {
304305 }
305306}
306307
307- LIBC_INLINE static constexpr bool iswalnum (wint_t wch) {
308+ LIBC_INLINE static constexpr bool iswalnum (wchar_t wch) {
308309 switch (wch) {
309310 case L' a' :
310311 case L' b' :
@@ -374,7 +375,7 @@ LIBC_INLINE static constexpr bool iswalnum(wint_t wch) {
374375 }
375376}
376377
377- LIBC_INLINE static constexpr int b36_wchar_to_int (wint_t wch) {
378+ LIBC_INLINE static constexpr int b36_wchar_to_int (wchar_t wch) {
378379 switch (wch) {
379380 case L' 0' :
380381 return 0 ;
@@ -479,7 +480,7 @@ LIBC_INLINE static constexpr int b36_wchar_to_int(wint_t wch) {
479480 }
480481}
481482
482- LIBC_INLINE static constexpr wint_t int_to_b36_wchar (int num) {
483+ LIBC_INLINE static constexpr wchar_t int_to_b36_wchar (int num) {
483484 // Can't actually use LIBC_ASSERT here because it depends on integer_to_string
484485 // which depends on this.
485486
@@ -562,7 +563,7 @@ LIBC_INLINE static constexpr wint_t int_to_b36_wchar(int num) {
562563 }
563564}
564565
565- LIBC_INLINE static constexpr bool iswspace (wint_t wch) {
566+ LIBC_INLINE static constexpr bool iswspace (wchar_t wch) {
566567 switch (wch) {
567568 case L' ' :
568569 case L' \t ' :
0 commit comments