Blame lib/wctype.in.h

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