30 #pragma GCC system_header 34 #if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__) 41 #include_next <wctype.h> 71 # include_next <wctype.h> 77 #ifndef _GL_INLINE_HEADER_BEGIN 78 #error "Please include config.h first." 81 #ifndef _GL_WCTYPE_INLINE 82 # define _GL_WCTYPE_INLINE _GL_INLINE 90 #if defined __cplusplus && defined GNULIB_NAMESPACE 91 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 92 # define _GL_END_NAMESPACE } 94 # define _GL_BEGIN_NAMESPACE 95 # define _GL_END_NAMESPACE 159 #if defined __cplusplus 160 # define _GL_EXTERN_C extern "C" 162 # define _GL_EXTERN_C extern 172 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 173 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 174 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 175 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 184 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 185 _GL_EXTERN_C rettype func parameters_and_attributes 196 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 197 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 198 #if defined __cplusplus && defined GNULIB_NAMESPACE 199 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 200 namespace GNULIB_NAMESPACE \ 202 static const struct _gl_ ## func ## _wrapper \ 204 typedef rettype (*type) parameters; \ 205 inline type rpl () const { return ::rpl_func; } \ 206 inline operator type () const { return rpl (); } \ 209 _GL_EXTERN_C int _gl_cxxalias_dummy 211 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 212 _GL_EXTERN_C int _gl_cxxalias_dummy 220 #if defined __cplusplus && defined GNULIB_NAMESPACE 221 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 222 namespace GNULIB_NAMESPACE \ 224 static const struct _gl_ ## func ## _wrapper \ 226 typedef rettype (*type) parameters; \ 227 inline type rpl () const \ 228 { return reinterpret_cast<type>(::rpl_func); } \ 229 inline operator type () const { return rpl (); } \ 232 _GL_EXTERN_C int _gl_cxxalias_dummy 234 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 235 _GL_EXTERN_C int _gl_cxxalias_dummy 248 #if defined __cplusplus && defined GNULIB_NAMESPACE 249 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 250 namespace GNULIB_NAMESPACE \ 252 static const struct _gl_ ## func ## _wrapper \ 254 typedef rettype (*type) parameters; \ 255 inline type rpl () const { return ::func; } \ 256 inline operator type () const { return rpl (); } \ 259 _GL_EXTERN_C int _gl_cxxalias_dummy 261 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 262 _GL_EXTERN_C int _gl_cxxalias_dummy 270 #if defined __cplusplus && defined GNULIB_NAMESPACE 271 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 272 namespace GNULIB_NAMESPACE \ 274 static const struct _gl_ ## func ## _wrapper \ 276 typedef rettype (*type) parameters; \ 277 inline type rpl () const \ 278 { return reinterpret_cast<type>(::func); } \ 279 inline operator type () const { return rpl (); }\ 282 _GL_EXTERN_C int _gl_cxxalias_dummy 284 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 285 _GL_EXTERN_C int _gl_cxxalias_dummy 294 #if defined __cplusplus && defined GNULIB_NAMESPACE 300 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 301 namespace GNULIB_NAMESPACE \ 303 static const struct _gl_ ## func ## _wrapper \ 305 typedef rettype (*type) parameters; \ 307 inline type rpl () const \ 308 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 310 inline operator type () const { return rpl (); } \ 313 _GL_EXTERN_C int _gl_cxxalias_dummy 315 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 316 _GL_EXTERN_C int _gl_cxxalias_dummy 323 #if defined __cplusplus && defined GNULIB_NAMESPACE 324 # define _GL_CXXALIASWARN(func) \ 325 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 326 # define _GL_CXXALIASWARN_1(func,namespace) \ 327 _GL_CXXALIASWARN_2 (func, namespace) 331 # define _GL_CXXALIASWARN_2(func,namespace) \ 332 _GL_WARN_ON_USE (func, \ 333 "The symbol ::" #func " refers to the system function. " \ 334 "Use " #namespace "::" #func " instead.") 335 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 336 # define _GL_CXXALIASWARN_2(func,namespace) \ 337 extern __typeof__ (func) func 339 # define _GL_CXXALIASWARN_2(func,namespace) \ 340 _GL_EXTERN_C int _gl_cxxalias_dummy 343 # define _GL_CXXALIASWARN(func) \ 344 _GL_EXTERN_C int _gl_cxxalias_dummy 350 #if defined __cplusplus && defined GNULIB_NAMESPACE 351 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 352 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 354 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 355 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 359 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 360 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 361 "The symbol ::" #func " refers to the system function. " \ 362 "Use " #namespace "::" #func " instead.") 363 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 364 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 365 extern __typeof__ (func) func 367 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 368 _GL_EXTERN_C int _gl_cxxalias_dummy 371 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 372 _GL_EXTERN_C int _gl_cxxalias_dummy 378 #ifndef _GL_WARN_ON_USE 380 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 382 # define _GL_WARN_ON_USE(function, message) \ 383 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 384 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 386 # define _GL_WARN_ON_USE(function, message) \ 387 extern __typeof__ (function) function 389 # define _GL_WARN_ON_USE(function, message) \ 390 _GL_WARN_EXTERN_C int _gl_warn_on_use 400 #ifndef _GL_WARN_ON_USE_CXX 401 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 402 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 403 extern rettype function parameters_and_attributes \ 404 __attribute__ ((__warning__ (msg))) 405 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 407 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 408 extern rettype function parameters_and_attributes 410 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 411 _GL_WARN_EXTERN_C int _gl_warn_on_use 417 #ifndef _GL_WARN_EXTERN_C 418 # if defined __cplusplus 419 # define _GL_WARN_EXTERN_C extern "C" 421 # define _GL_WARN_EXTERN_C extern 439 #if !1 && !defined wint_t 448 # if defined _MSC_VER 449 # if !GNULIB_defined_wint_t 450 # include <crtdefs.h> 451 typedef unsigned int rpl_wint_t;
453 # define wint_t rpl_wint_t 454 # define GNULIB_defined_wint_t 1 458 # define WEOF ((wint_t) -1) 463 #if !GNULIB_defined_wctype_functions 493 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 494 # define iswalnum rpl_iswalnum 495 # define iswalpha rpl_iswalpha 496 # define iswblank rpl_iswblank 497 # define iswcntrl rpl_iswcntrl 498 # define iswdigit rpl_iswdigit 499 # define iswgraph rpl_iswgraph 500 # define iswlower rpl_iswlower 501 # define iswprint rpl_iswprint 502 # define iswpunct rpl_iswpunct 503 # define iswspace rpl_iswspace 504 # define iswupper rpl_iswupper 505 # define iswxdigit rpl_iswxdigit 509 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 510 # define towlower rpl_towlower 511 # define towupper rpl_towupper 523 return ((wc >=
'0' && wc <=
'9')
524 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z'));
535 return (wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z';
546 return wc ==
' ' || wc ==
'\t';
557 return (wc & ~0x1f) == 0 || wc == 0x7f;
568 return wc >=
'0' && wc <=
'9';
579 return wc >=
'!' && wc <=
'~';
590 return wc >=
'a' && wc <=
'z';
601 return wc >=
' ' && wc <=
'~';
612 return (wc >=
'!' && wc <=
'~' 613 && !((wc >=
'0' && wc <=
'9')
614 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z')));
625 return (wc ==
' ' || wc ==
'\t' 626 || wc ==
'\n' || wc ==
'\v' || wc ==
'\f' || wc ==
'\r');
637 return wc >=
'A' && wc <=
'Z';
648 return ((wc >=
'0' && wc <=
'9')
649 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'F'));
660 return (wc >=
'A' && wc <=
'Z' ? wc -
'A' +
'a' : wc);
671 return (wc >=
'a' && wc <=
'z' ? wc -
'a' +
'A' : wc);
674 # elif 0 && (! 1 || 0) 678 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 679 # define iswblank rpl_iswblank 688 # if defined __MINGW32__ 704 rpl_towlower (wint_t wc)
706 return (wint_t) (wchar_t) towlower (wc);
708 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 709 # define towlower rpl_towlower 713 rpl_towupper (wint_t wc)
715 return (wint_t) (wchar_t) towupper (wc);
717 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 718 # define towupper rpl_towupper 723 # define GNULIB_defined_wctype_functions 1 773 # if !GNULIB_defined_wctype_t 774 typedef void * wctype_t;
775 # define GNULIB_defined_wctype_t 1 786 #elif defined GNULIB_POSIXCHECK 788 # if HAVE_RAW_DECL_WCTYPE 790 "use gnulib module wctype for portability");
803 #elif defined GNULIB_POSIXCHECK 805 # if HAVE_RAW_DECL_ISWCTYPE 807 "use gnulib module iswctype for portability");
811 #if 0 || defined __MINGW32__ 822 # if !GNULIB_defined_wctrans_t 823 typedef void * wctrans_t;
824 # define GNULIB_defined_wctrans_t 1 835 #elif defined GNULIB_POSIXCHECK 837 # if HAVE_RAW_DECL_WCTRANS 839 "use gnulib module wctrans for portability");
852 #elif defined GNULIB_POSIXCHECK 854 # if HAVE_RAW_DECL_TOWCTRANS 856 "use gnulib module towctrans for portability");
#define _GL_WCTYPE_INLINE
_GL_CXXALIAS_SYS(iswalnum, int,(wint_t wc))
#define _GL_WARN_ON_USE(function, message)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
_GL_CXXALIASWARN(iswalnum)
#define _GL_INLINE_HEADER_END
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_INLINE_HEADER_BEGIN