Blame lib/localeinfo.h

Packit 709fb3
/* locale information
Packit 709fb3
Packit 709fb3
   Copyright 2016-2017 Free Software Foundation, Inc.
Packit 709fb3
Packit 709fb3
   This program is free software; you can redistribute it and/or modify
Packit 709fb3
   it under the terms of the GNU General Public License as published by
Packit 709fb3
   the Free Software Foundation; either version 3, or (at your option)
Packit 709fb3
   any later version.
Packit 709fb3
Packit 709fb3
   This program is distributed in the hope that it will be useful,
Packit 709fb3
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 709fb3
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 709fb3
   GNU General Public License for more details.
Packit 709fb3
Packit 709fb3
   You should have received a copy of the GNU General Public License
Packit 709fb3
   along with this program; if not, write to the Free Software
Packit 709fb3
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
Packit 709fb3
   02110-1301, USA.  */
Packit 709fb3
Packit 709fb3
/* Written by Paul Eggert.  */
Packit 709fb3
Packit 709fb3
#include <limits.h>
Packit 709fb3
#include <stdbool.h>
Packit 709fb3
#include <wchar.h>
Packit 709fb3
Packit 709fb3
struct localeinfo
Packit 709fb3
{
Packit 709fb3
  /* MB_CUR_MAX > 1.  */
Packit 709fb3
  bool multibyte;
Packit 709fb3
Packit 709fb3
  /* The locale uses UTF-8.  */
Packit 709fb3
  bool using_utf8;
Packit 709fb3
Packit 709fb3
  /* An array indexed by byte values B that contains 1 if B is a
Packit 709fb3
     single-byte character, -1 if B is an encoding error, and -2 if B
Packit 709fb3
     is the leading byte of a multibyte character that contains more
Packit 709fb3
     than one byte.  */
Packit 709fb3
  signed char sbclen[UCHAR_MAX + 1];
Packit 709fb3
Packit 709fb3
  /* An array indexed by byte values B that contains the corresponding
Packit 709fb3
     wide character (if any) for B if sbclen[B] == 1.  WEOF means the
Packit 709fb3
     byte is not a valid single-byte character, i.e., sbclen[B] == -1
Packit 709fb3
     or -2.  */
Packit 709fb3
  wint_t sbctowc[UCHAR_MAX + 1];
Packit 709fb3
};
Packit 709fb3
Packit 709fb3
extern void init_localeinfo (struct localeinfo *);
Packit 709fb3
Packit 709fb3
/* Maximum number of characters that can be the case-folded
Packit 709fb3
   counterparts of a single character, not counting the character
Packit 709fb3
   itself.  This is a generous upper bound.  */
Packit 709fb3
enum { CASE_FOLDED_BUFSIZE = 32 };
Packit 709fb3
Packit 709fb3
extern int case_folded_counterparts (wint_t, wchar_t[CASE_FOLDED_BUFSIZE]);