X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Fwctype.in.h;fp=lib%2Fwctype.in.h;h=16981b6ac40af2d90e5621b9d00cf96aeed45ac1;hb=a2016c1de6e4884f6c8ed5cc498f3bf821c25ca4;hp=895b723eb3f01317426d7b575c56557e5b7cb3a1;hpb=c7e61475680fa226bd9b8bdd469cd66914e630f5;p=debian%2Fgzip diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 895b723..16981b6 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2009 Free Software Foundation, Inc. + Copyright (C) 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,6 +64,10 @@ # endif #endif +#ifdef __cplusplus +extern "C" { +#endif + /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. Assume all 12 functions are implemented the same way, or not at all. */ @@ -74,44 +78,44 @@ refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ -# undef iswalnum -# undef iswalpha -# undef iswblank -# undef iswcntrl -# undef iswdigit -# undef iswgraph -# undef iswlower -# undef iswprint -# undef iswpunct -# undef iswspace -# undef iswupper -# undef iswxdigit -# undef towlower -# undef towupper +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper /* Linux libc5 has and the functions but they are broken. */ -# if @REPLACE_ISWCNTRL@ -# define iswalnum rpl_iswalnum -# define iswalpha rpl_iswalpha -# define iswblank rpl_iswblank -# define iswcntrl rpl_iswcntrl -# define iswdigit rpl_iswdigit -# define iswgraph rpl_iswgraph -# define iswlower rpl_iswlower -# define iswprint rpl_iswprint -# define iswpunct rpl_iswpunct -# define iswspace rpl_iswspace -# define iswupper rpl_iswupper -# define iswxdigit rpl_iswxdigit -# define towlower rpl_towlower -# define towupper rpl_towupper -# endif +# if @REPLACE_ISWCNTRL@ +# define iswalnum rpl_iswalnum +# define iswalpha rpl_iswalpha +# define iswblank rpl_iswblank +# define iswcntrl rpl_iswcntrl +# define iswdigit rpl_iswdigit +# define iswgraph rpl_iswgraph +# define iswlower rpl_iswlower +# define iswprint rpl_iswprint +# define iswpunct rpl_iswpunct +# define iswspace rpl_iswspace +# define iswupper rpl_iswupper +# define iswxdigit rpl_iswxdigit +# define towlower rpl_towlower +# define towupper rpl_towupper +# endif static inline int iswalnum (wint_t wc) { return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } static inline int @@ -160,15 +164,15 @@ static inline int iswpunct (wint_t wc) { return (wc >= '!' && wc <= '~' - && !((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); + && !((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } static inline int iswspace (wint_t wc) { return (wc == ' ' || wc == '\t' - || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); + || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } static inline int @@ -181,7 +185,7 @@ static inline int iswxdigit (wint_t wc) { return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } static inline wint_t @@ -196,9 +200,9 @@ towupper (wint_t wc) return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } -# endif /* ! HAVE_ISWCNTRL */ +#endif /* ! HAVE_ISWCNTRL || REPLACE_ISWCNTRL */ -# if defined __MINGW32__ +#if defined __MINGW32__ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library @@ -218,16 +222,20 @@ rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); } -# define towlower rpl_towlower +# define towlower rpl_towlower static inline wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); } -# define towupper rpl_towupper +# define towupper rpl_towupper -# endif +#endif /* __MINGW32__ */ + +#ifdef __cplusplus +} +#endif #endif /* _GL_WCTYPE_H */ #endif /* _GL_WCTYPE_H */