Blame lib/wctype.in.h

Packit Service a2489d
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
Packit Service a2489d
Packit Service a2489d
   Copyright (C) 2006-2018 Free Software Foundation, Inc.
Packit Service a2489d
Packit Service a2489d
   This program is free software; you can redistribute it and/or modify
Packit Service a2489d
   it under the terms of the GNU General Public License as published by
Packit Service a2489d
   the Free Software Foundation; either version 3, or (at your option)
Packit Service a2489d
   any later version.
Packit Service a2489d
Packit Service a2489d
   This program is distributed in the hope that it will be useful,
Packit Service a2489d
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2489d
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a2489d
   GNU General Public License for more details.
Packit Service a2489d
Packit Service a2489d
   You should have received a copy of the GNU General Public License
Packit Service a2489d
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2489d
Packit Service a2489d
/* Written by Bruno Haible and Paul Eggert.  */
Packit Service a2489d
Packit Service a2489d
/*
Packit Service a2489d
 * ISO C 99 <wctype.h> for platforms that lack it.
Packit Service a2489d
 * <http://www.opengroup.org/susv3xbd/wctype.h.html>
Packit Service a2489d
 *
Packit Service a2489d
 * iswctype, towctrans, towlower, towupper, wctrans, wctype,
Packit Service a2489d
 * wctrans_t, and wctype_t are not yet implemented.
Packit Service a2489d
 */
Packit Service a2489d
Packit Service a2489d
#if __GNUC__ >= 3
Packit Service a2489d
@PRAGMA_SYSTEM_HEADER@
Packit Service a2489d
#endif
Packit Service a2489d
@PRAGMA_COLUMNS@
Packit Service a2489d
Packit Service a2489d
#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__)
Packit Service a2489d
Packit Service a2489d
/* Special invocation convention:
Packit Service a2489d
   - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of
Packit Service a2489d
     <wctype.h> is being processed, which doesn't include the idempotency
Packit Service a2489d
     guard.   */
Packit Service a2489d
Packit Service a2489d
#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@
Packit Service a2489d
Packit Service a2489d
#else
Packit Service a2489d
/* Normal invocation convention.  */
Packit Service a2489d
Packit Service a2489d
#ifndef _@GUARD_PREFIX@_WCTYPE_H
Packit Service a2489d
Packit Service a2489d
#if @HAVE_WINT_T@
Packit Service a2489d
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
Packit Service a2489d
   Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
Packit Service a2489d
   <wchar.h>.
Packit Service a2489d
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
Packit Service a2489d
   included before <wchar.h>.  */
Packit Service a2489d
# include <stddef.h>
Packit Service a2489d
# include <stdio.h>
Packit Service a2489d
# include <time.h>
Packit Service a2489d
# include <wchar.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and
Packit Service a2489d
   isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>.  Include
Packit Service a2489d
   <ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
Packit Service a2489d
   declarations.  */
Packit Service a2489d
#if defined _WIN32 && ! defined __CYGWIN__
Packit Service a2489d
# include <ctype.h>
Packit Service a2489d
# include <wchar.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Include the original <wctype.h> if it exists.
Packit Service a2489d
   BeOS 5 has the functions but no <wctype.h>.  */
Packit Service a2489d
/* The include_next requires a split double-inclusion guard.  */
Packit Service a2489d
#if @HAVE_WCTYPE_H@
Packit Service a2489d
# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#ifndef _@GUARD_PREFIX@_WCTYPE_H
Packit Service a2489d
#define _@GUARD_PREFIX@_WCTYPE_H
Packit Service a2489d
Packit Service a2489d
#ifndef _GL_INLINE_HEADER_BEGIN
Packit Service a2489d
 #error "Please include config.h first."
Packit Service a2489d
#endif
Packit Service a2489d
_GL_INLINE_HEADER_BEGIN
Packit Service a2489d
#ifndef _GL_WCTYPE_INLINE
Packit Service a2489d
# define _GL_WCTYPE_INLINE _GL_INLINE
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service a2489d
Packit Service a2489d
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service a2489d
Packit Service a2489d
/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
Packit Service a2489d
   #defines a number of identifiers in the application namespace.  Revert
Packit Service a2489d
   these #defines.  */
Packit Service a2489d
#ifdef __sun
Packit Service a2489d
# undef multibyte
Packit Service a2489d
# undef eucw1
Packit Service a2489d
# undef eucw2
Packit Service a2489d
# undef eucw3
Packit Service a2489d
# undef scrw1
Packit Service a2489d
# undef scrw2
Packit Service a2489d
# undef scrw3
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
Packit Service a2489d
#if !@HAVE_WINT_T@ && !defined wint_t
Packit Service a2489d
# define wint_t int
Packit Service a2489d
# ifndef WEOF
Packit Service a2489d
#  define WEOF -1
Packit Service a2489d
# endif
Packit Service a2489d
#else
Packit Service a2489d
/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
Packit Service a2489d
   <stddef.h>.  This is too small: ISO C 99 section 7.24.1.(2) says that
Packit Service a2489d
   wint_t must be "unchanged by default argument promotions".  Override it.  */
Packit Service a2489d
# if @GNULIB_OVERRIDES_WINT_T@
Packit Service a2489d
#  if !GNULIB_defined_wint_t
Packit Service a2489d
#   if @HAVE_CRTDEFS_H@
Packit Service a2489d
#    include <crtdefs.h>
Packit Service a2489d
#   else
Packit Service a2489d
#    include <stddef.h>
Packit Service a2489d
#   endif
Packit Service a2489d
typedef unsigned int rpl_wint_t;
Packit Service a2489d
#   undef wint_t
Packit Service a2489d
#   define wint_t rpl_wint_t
Packit Service a2489d
#   define GNULIB_defined_wint_t 1
Packit Service a2489d
#  endif
Packit Service a2489d
# endif
Packit Service a2489d
# ifndef WEOF
Packit Service a2489d
#  define WEOF ((wint_t) -1)
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if !GNULIB_defined_wctype_functions
Packit Service a2489d
Packit Service a2489d
/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
Packit Service a2489d
   Linux libc5 has <wctype.h> and the functions but they are broken.
Packit Service a2489d
   Assume all 11 functions (all isw* except iswblank) are implemented the
Packit Service a2489d
   same way, or not at all.  */
Packit Service a2489d
# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
Packit Service a2489d
Packit Service a2489d
/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
Packit Service a2489d
   undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
Packit Service a2489d
   refer to system functions like _iswctype that are not in the
Packit Service a2489d
   standard C library.  Rather than try to get ancient buggy
Packit Service a2489d
   implementations like this to work, just disable them.  */
Packit Service a2489d
#  undef iswalnum
Packit Service a2489d
#  undef iswalpha
Packit Service a2489d
#  undef iswblank
Packit Service a2489d
#  undef iswcntrl
Packit Service a2489d
#  undef iswdigit
Packit Service a2489d
#  undef iswgraph
Packit Service a2489d
#  undef iswlower
Packit Service a2489d
#  undef iswprint
Packit Service a2489d
#  undef iswpunct
Packit Service a2489d
#  undef iswspace
Packit Service a2489d
#  undef iswupper
Packit Service a2489d
#  undef iswxdigit
Packit Service a2489d
#  undef towlower
Packit Service a2489d
#  undef towupper
Packit Service a2489d
Packit Service a2489d
/* Linux libc5 has <wctype.h> and the functions but they are broken.  */
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#    define iswalnum rpl_iswalnum
Packit Service a2489d
#    define iswalpha rpl_iswalpha
Packit Service a2489d
#    define iswblank rpl_iswblank
Packit Service a2489d
#    define iswcntrl rpl_iswcntrl
Packit Service a2489d
#    define iswdigit rpl_iswdigit
Packit Service a2489d
#    define iswgraph rpl_iswgraph
Packit Service a2489d
#    define iswlower rpl_iswlower
Packit Service a2489d
#    define iswprint rpl_iswprint
Packit Service a2489d
#    define iswpunct rpl_iswpunct
Packit Service a2489d
#    define iswspace rpl_iswspace
Packit Service a2489d
#    define iswupper rpl_iswupper
Packit Service a2489d
#    define iswxdigit rpl_iswxdigit
Packit Service a2489d
#   endif
Packit Service a2489d
#  endif
Packit Service a2489d
#  if @REPLACE_TOWLOWER@
Packit Service a2489d
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#    define towlower rpl_towlower
Packit Service a2489d
#    define towupper rpl_towupper
Packit Service a2489d
#   endif
Packit Service a2489d
#  endif
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswalnum
Packit Service a2489d
#  else
Packit Service a2489d
iswalnum
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return ((wc >= '0' && wc <= '9')
Packit Service a2489d
          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswalpha
Packit Service a2489d
#  else
Packit Service a2489d
iswalpha
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswblank
Packit Service a2489d
#  else
Packit Service a2489d
iswblank
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc == ' ' || wc == '\t';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswcntrl
Packit Service a2489d
#  else
Packit Service a2489d
iswcntrl
Packit Service a2489d
#  endif
Packit Service a2489d
        (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc & ~0x1f) == 0 || wc == 0x7f;
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswdigit
Packit Service a2489d
#  else
Packit Service a2489d
iswdigit
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc >= '0' && wc <= '9';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswgraph
Packit Service a2489d
#  else
Packit Service a2489d
iswgraph
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc >= '!' && wc <= '~';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswlower
Packit Service a2489d
#  else
Packit Service a2489d
iswlower
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc >= 'a' && wc <= 'z';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswprint
Packit Service a2489d
#  else
Packit Service a2489d
iswprint
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc >= ' ' && wc <= '~';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswpunct
Packit Service a2489d
#  else
Packit Service a2489d
iswpunct
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc >= '!' && wc <= '~'
Packit Service a2489d
          && !((wc >= '0' && wc <= '9')
Packit Service a2489d
               || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswspace
Packit Service a2489d
#  else
Packit Service a2489d
iswspace
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc == ' ' || wc == '\t'
Packit Service a2489d
          || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswupper
Packit Service a2489d
#  else
Packit Service a2489d
iswupper
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return wc >= 'A' && wc <= 'Z';
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE int
Packit Service a2489d
#  if @REPLACE_ISWCNTRL@
Packit Service a2489d
rpl_iswxdigit
Packit Service a2489d
#  else
Packit Service a2489d
iswxdigit
Packit Service a2489d
#  endif
Packit Service a2489d
          (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return ((wc >= '0' && wc <= '9')
Packit Service a2489d
          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE wint_t
Packit Service a2489d
#  if @REPLACE_TOWLOWER@
Packit Service a2489d
rpl_towlower
Packit Service a2489d
#  else
Packit Service a2489d
towlower
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE wint_t
Packit Service a2489d
#  if @REPLACE_TOWLOWER@
Packit Service a2489d
rpl_towupper
Packit Service a2489d
#  else
Packit Service a2489d
towupper
Packit Service a2489d
#  endif
Packit Service a2489d
         (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
Packit Service a2489d
}
Packit Service a2489d
Packit Service a2489d
# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
Packit Service a2489d
/* Only the iswblank function is missing.  */
Packit Service a2489d
Packit Service a2489d
#  if @REPLACE_ISWBLANK@
Packit Service a2489d
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#    define iswblank rpl_iswblank
Packit Service a2489d
#   endif
Packit Service a2489d
_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
Packit Service a2489d
#  else
Packit Service a2489d
_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
Packit Service a2489d
#  endif
Packit Service a2489d
Packit Service a2489d
# endif
Packit Service a2489d
Packit Service a2489d
# if defined __MINGW32__
Packit Service a2489d
Packit Service a2489d
/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
Packit Service a2489d
   The functions towlower and towupper are implemented in the MSVCRT library
Packit Service a2489d
   to take a wchar_t argument and return a wchar_t result.  mingw declares
Packit Service a2489d
   these functions to take a wint_t argument and return a wint_t result.
Packit Service a2489d
   This means that:
Packit Service a2489d
   1. When the user passes an argument outside the range 0x0000..0xFFFF, the
Packit Service a2489d
      function will look only at the lower 16 bits.  This is allowed according
Packit Service a2489d
      to POSIX.
Packit Service a2489d
   2. The return value is returned in the lower 16 bits of the result register.
Packit Service a2489d
      The upper 16 bits are random: whatever happened to be in that part of the
Packit Service a2489d
      result register.  We need to fix this by adding a zero-extend from
Packit Service a2489d
      wchar_t to wint_t after the call.  */
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE wint_t
Packit Service a2489d
rpl_towlower (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wint_t) (wchar_t) towlower (wc);
Packit Service a2489d
}
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define towlower rpl_towlower
Packit Service a2489d
#  endif
Packit Service a2489d
Packit Service a2489d
_GL_WCTYPE_INLINE wint_t
Packit Service a2489d
rpl_towupper (wint_t wc)
Packit Service a2489d
{
Packit Service a2489d
  return (wint_t) (wchar_t) towupper (wc);
Packit Service a2489d
}
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define towupper rpl_towupper
Packit Service a2489d
#  endif
Packit Service a2489d
Packit Service a2489d
# endif /* __MINGW32__ */
Packit Service a2489d
Packit Service a2489d
# define GNULIB_defined_wctype_functions 1
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @REPLACE_ISWCNTRL@
Packit Service a2489d
_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
Packit Service a2489d
#else
Packit Service a2489d
_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
Packit Service a2489d
#endif
Packit Service a2489d
_GL_CXXALIASWARN (iswalnum);
Packit Service a2489d
_GL_CXXALIASWARN (iswalpha);
Packit Service a2489d
_GL_CXXALIASWARN (iswcntrl);
Packit Service a2489d
_GL_CXXALIASWARN (iswdigit);
Packit Service a2489d
_GL_CXXALIASWARN (iswgraph);
Packit Service a2489d
_GL_CXXALIASWARN (iswlower);
Packit Service a2489d
_GL_CXXALIASWARN (iswprint);
Packit Service a2489d
_GL_CXXALIASWARN (iswpunct);
Packit Service a2489d
_GL_CXXALIASWARN (iswspace);
Packit Service a2489d
_GL_CXXALIASWARN (iswupper);
Packit Service a2489d
_GL_CXXALIASWARN (iswxdigit);
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_ISWBLANK@
Packit Service a2489d
# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@
Packit Service a2489d
_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (iswblank);
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if !@HAVE_WCTYPE_T@
Packit Service a2489d
# if !GNULIB_defined_wctype_t
Packit Service a2489d
typedef void * wctype_t;
Packit Service a2489d
#  define GNULIB_defined_wctype_t 1
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Get a descriptor for a wide character property.  */
Packit Service a2489d
#if @GNULIB_WCTYPE@
Packit Service a2489d
# if !@HAVE_WCTYPE_T@
Packit Service a2489d
_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
Packit Service a2489d
_GL_CXXALIASWARN (wctype);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef wctype
Packit Service a2489d
# if HAVE_RAW_DECL_WCTYPE
Packit Service a2489d
_GL_WARN_ON_USE (wctype, "wctype is unportable - "
Packit Service a2489d
                 "use gnulib module wctype for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Test whether a wide character has a given property.
Packit Service a2489d
   The argument WC must be either a wchar_t value or WEOF.
Packit Service a2489d
   The argument DESC must have been returned by the wctype() function.  */
Packit Service a2489d
#if @GNULIB_ISWCTYPE@
Packit Service a2489d
# if !@HAVE_WCTYPE_T@
Packit Service a2489d
_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
Packit Service a2489d
_GL_CXXALIASWARN (iswctype);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef iswctype
Packit Service a2489d
# if HAVE_RAW_DECL_ISWCTYPE
Packit Service a2489d
_GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
Packit Service a2489d
                 "use gnulib module iswctype for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @REPLACE_TOWLOWER@ || defined __MINGW32__
Packit Service a2489d
_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
Packit Service a2489d
#else
Packit Service a2489d
_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
Packit Service a2489d
_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
Packit Service a2489d
#endif
Packit Service a2489d
_GL_CXXALIASWARN (towlower);
Packit Service a2489d
_GL_CXXALIASWARN (towupper);
Packit Service a2489d
Packit Service a2489d
#if !@HAVE_WCTRANS_T@
Packit Service a2489d
# if !GNULIB_defined_wctrans_t
Packit Service a2489d
typedef void * wctrans_t;
Packit Service a2489d
#  define GNULIB_defined_wctrans_t 1
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Get a descriptor for a wide character case conversion.  */
Packit Service a2489d
#if @GNULIB_WCTRANS@
Packit Service a2489d
# if !@HAVE_WCTRANS_T@
Packit Service a2489d
_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
Packit Service a2489d
_GL_CXXALIASWARN (wctrans);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef wctrans
Packit Service a2489d
# if HAVE_RAW_DECL_WCTRANS
Packit Service a2489d
_GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
Packit Service a2489d
                 "use gnulib module wctrans for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Perform a given case conversion on a wide character.
Packit Service a2489d
   The argument WC must be either a wchar_t value or WEOF.
Packit Service a2489d
   The argument DESC must have been returned by the wctrans() function.  */
Packit Service a2489d
#if @GNULIB_TOWCTRANS@
Packit Service a2489d
# if !@HAVE_WCTRANS_T@
Packit Service a2489d
_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
Packit Service a2489d
_GL_CXXALIASWARN (towctrans);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef towctrans
Packit Service a2489d
# if HAVE_RAW_DECL_TOWCTRANS
Packit Service a2489d
_GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
Packit Service a2489d
                 "use gnulib module towctrans for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
_GL_INLINE_HEADER_END
Packit Service a2489d
Packit Service a2489d
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
Packit Service a2489d
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
Packit Service a2489d
#endif