From 343713689c2b1d98e1386970b7ca07cef3418b56 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 7 Jan 2010 23:57:15 +0100 Subject: [PATCH] Fix indentation of wctype.in.h, broken since 2007-01-06. (cherry picked from commit ccc06b224dfe349ef3d7324fd688cf630a77004c) --- ChangeLog | 5 +++++ lib/wctype.in.h | 70 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 40 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c573e40a..18ca2b110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-01-07 Bruno Haible + Fix indentation of wctype.in.h, broken since 2007-01-06. + * lib/wctype.in.h: Fix indentation of preprocessor directives. + +2010-01-07 Bruno Haible + mbslen: Avoid collision with system function. * lib/string.in.h [MirBSD]: Include . (mbslen): Undefine first. Alias mbslen to rpl_mbslen. diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 7e8b0907c..a73487876 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -76,38 +76,38 @@ extern "C" { 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) @@ -198,9 +198,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 @@ -220,16 +220,16 @@ 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 } -- 2.11.0