Blame gllib/unicase.in.h

rpm-build 858c0f
/* Unicode character case mappings.
rpm-build 858c0f
   Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc.
rpm-build 858c0f
rpm-build 858c0f
   This program is free software: you can redistribute it and/or modify it
rpm-build 858c0f
   under the terms of the GNU General Public License as published
rpm-build 858c0f
   by the Free Software Foundation; either version 3 of the License, or
rpm-build 858c0f
   (at your option) any later version.
rpm-build 858c0f
rpm-build 858c0f
   This program is distributed in the hope that it will be useful,
rpm-build 858c0f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 858c0f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 858c0f
   General Public License for more details.
rpm-build 858c0f
rpm-build 858c0f
   You should have received a copy of the GNU General Public License
rpm-build 858c0f
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
rpm-build 858c0f
rpm-build 858c0f
#ifndef _UNICASE_H
rpm-build 858c0f
#define _UNICASE_H
rpm-build 858c0f
rpm-build 858c0f
#include "unitypes.h"
rpm-build 858c0f
rpm-build 858c0f
/* Get bool.  */
rpm-build 858c0f
#include <stdbool.h>
rpm-build 858c0f
rpm-build 858c0f
/* Get size_t.  */
rpm-build 858c0f
#include <stddef.h>
rpm-build 858c0f
rpm-build 858c0f
/* Get uninorm_t.  */
rpm-build 858c0f
#include "uninorm.h"
rpm-build 858c0f
rpm-build 858c0f
#ifdef __cplusplus
rpm-build 858c0f
extern "C" {
rpm-build 858c0f
#endif
rpm-build 858c0f
rpm-build 858c0f
/* ========================================================================= */
rpm-build 858c0f
rpm-build 858c0f
/* Character case mappings.
rpm-build 858c0f
   These mappings are locale and context independent.
rpm-build 858c0f
   WARNING! These functions are not sufficient for languages such as German.
rpm-build 858c0f
   Better use the functions below that treat an entire string at once and are
rpm-build 858c0f
   language aware.  */
rpm-build 858c0f
rpm-build 858c0f
/* Return the uppercase mapping of a Unicode character.  */
rpm-build 858c0f
extern ucs4_t
rpm-build 858c0f
       uc_toupper (ucs4_t uc)
rpm-build 858c0f
       _UC_ATTRIBUTE_CONST;
rpm-build 858c0f
rpm-build 858c0f
/* Return the lowercase mapping of a Unicode character.  */
rpm-build 858c0f
extern ucs4_t
rpm-build 858c0f
       uc_tolower (ucs4_t uc)
rpm-build 858c0f
       _UC_ATTRIBUTE_CONST;
rpm-build 858c0f
rpm-build 858c0f
/* Return the titlecase mapping of a Unicode character.  */
rpm-build 858c0f
extern ucs4_t
rpm-build 858c0f
       uc_totitle (ucs4_t uc)
rpm-build 858c0f
       _UC_ATTRIBUTE_CONST;
rpm-build 858c0f
rpm-build 858c0f
/* ========================================================================= */
rpm-build 858c0f
rpm-build 858c0f
/* String case mappings.  */
rpm-build 858c0f
rpm-build 858c0f
/* These functions are locale dependent.  The iso639_language argument
rpm-build 858c0f
   identifies the language (e.g. "tr" for Turkish).  NULL means to use
rpm-build 858c0f
   locale independent case mappings.  */
rpm-build 858c0f
rpm-build 858c0f
/* Return the ISO 639 language code of the current locale.
rpm-build 858c0f
   Return "" if it is unknown, or in the "C" locale.  */
rpm-build 858c0f
extern const char *
rpm-build 858c0f
       uc_locale_language (void)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
rpm-build 858c0f
/* Conventions:
rpm-build 858c0f
rpm-build 858c0f
   All functions prefixed with u8_ operate on UTF-8 encoded strings.
rpm-build 858c0f
   Their unit is an uint8_t (1 byte).
rpm-build 858c0f
rpm-build 858c0f
   All functions prefixed with u16_ operate on UTF-16 encoded strings.
rpm-build 858c0f
   Their unit is an uint16_t (a 2-byte word).
rpm-build 858c0f
rpm-build 858c0f
   All functions prefixed with u32_ operate on UCS-4 encoded strings.
rpm-build 858c0f
   Their unit is an uint32_t (a 4-byte word).
rpm-build 858c0f
rpm-build 858c0f
   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
rpm-build 858c0f
   n units.
rpm-build 858c0f
rpm-build 858c0f
   Functions returning a string result take a (resultbuf, lengthp) argument
rpm-build 858c0f
   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
rpm-build 858c0f
   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
rpm-build 858c0f
   allocated string is returned.  In both cases, *lengthp is set to the
rpm-build 858c0f
   length (number of units) of the returned string.  In case of error,
rpm-build 858c0f
   NULL is returned and errno is set.  */
rpm-build 858c0f
rpm-build 858c0f
/* Return the uppercase mapping of a string.
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It can also be NULL, for no normalization.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_toupper (const uint8_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                   uninorm_t nf,
rpm-build 858c0f
                   uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_toupper (const uint16_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_toupper (const uint32_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Return the lowercase mapping of a string.
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It can also be NULL, for no normalization.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_tolower (const uint8_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                   uninorm_t nf,
rpm-build 858c0f
                   uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_tolower (const uint16_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_tolower (const uint32_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Return the titlecase mapping of a string.
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It can also be NULL, for no normalization.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_totitle (const uint8_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                   uninorm_t nf,
rpm-build 858c0f
                   uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_totitle (const uint16_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_totitle (const uint32_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* The case-mapping context given by a prefix string.  */
rpm-build 858c0f
typedef struct casing_prefix_context
rpm-build 858c0f
        {
rpm-build 858c0f
          /* These fields are private, undocumented.  */
rpm-build 858c0f
          uint32_t last_char_except_ignorable;
rpm-build 858c0f
          uint32_t last_char_normal_or_above;
rpm-build 858c0f
        }
rpm-build 858c0f
        casing_prefix_context_t;
rpm-build 858c0f
/* The case-mapping context of the empty prefix string.  */
rpm-build 858c0f
extern const casing_prefix_context_t unicase_empty_prefix_context;
rpm-build 858c0f
/* Return the case-mapping context of a given prefix string.  */
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u8_casing_prefix_context (const uint8_t *s, size_t n);
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u16_casing_prefix_context (const uint16_t *s, size_t n);
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u32_casing_prefix_context (const uint32_t *s, size_t n);
rpm-build 858c0f
/* Return the case-mapping context of the prefix concat(A, S), given the
rpm-build 858c0f
   case-mapping context of the prefix A.  */
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u8_casing_prefixes_context (const uint8_t *s, size_t n,
rpm-build 858c0f
                                   casing_prefix_context_t a_context);
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u16_casing_prefixes_context (const uint16_t *s, size_t n,
rpm-build 858c0f
                                    casing_prefix_context_t a_context);
rpm-build 858c0f
extern casing_prefix_context_t
rpm-build 858c0f
       u32_casing_prefixes_context (const uint32_t *s, size_t n,
rpm-build 858c0f
                                    casing_prefix_context_t a_context);
rpm-build 858c0f
rpm-build 858c0f
/* The case-mapping context given by a suffix string.  */
rpm-build 858c0f
typedef struct casing_suffix_context
rpm-build 858c0f
        {
rpm-build 858c0f
          /* These fields are private, undocumented.  */
rpm-build 858c0f
          uint32_t first_char_except_ignorable;
rpm-build 858c0f
          uint32_t bits;
rpm-build 858c0f
        }
rpm-build 858c0f
        casing_suffix_context_t;
rpm-build 858c0f
/* The case-mapping context of the empty suffix string.  */
rpm-build 858c0f
extern const casing_suffix_context_t unicase_empty_suffix_context;
rpm-build 858c0f
/* Return the case-mapping context of a given suffix string.  */
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u8_casing_suffix_context (const uint8_t *s, size_t n);
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u16_casing_suffix_context (const uint16_t *s, size_t n);
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u32_casing_suffix_context (const uint32_t *s, size_t n);
rpm-build 858c0f
/* Return the case-mapping context of the suffix concat(S, A), given the
rpm-build 858c0f
   case-mapping context of the suffix A.  */
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u8_casing_suffixes_context (const uint8_t *s, size_t n,
rpm-build 858c0f
                                   casing_suffix_context_t a_context);
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u16_casing_suffixes_context (const uint16_t *s, size_t n,
rpm-build 858c0f
                                    casing_suffix_context_t a_context);
rpm-build 858c0f
extern casing_suffix_context_t
rpm-build 858c0f
       u32_casing_suffixes_context (const uint32_t *s, size_t n,
rpm-build 858c0f
                                    casing_suffix_context_t a_context);
rpm-build 858c0f
rpm-build 858c0f
/* Return the uppercase mapping of a string that is surrounded by a prefix
rpm-build 858c0f
   and a suffix.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_ct_toupper (const uint8_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_ct_toupper (const uint16_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_ct_toupper (const uint32_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Return the lowercase mapping of a string that is surrounded by a prefix
rpm-build 858c0f
   and a suffix.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_ct_tolower (const uint8_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_ct_tolower (const uint16_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_ct_tolower (const uint32_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Return the titlecase mapping of a string that is surrounded by a prefix
rpm-build 858c0f
   and a suffix.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_ct_totitle (const uint8_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_ct_totitle (const uint16_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_ct_totitle (const uint32_t *s, size_t n,
rpm-build 858c0f
                      casing_prefix_context_t prefix_context,
rpm-build 858c0f
                      casing_suffix_context_t suffix_context,
rpm-build 858c0f
                      const char *iso639_language,
rpm-build 858c0f
                      uninorm_t nf,
rpm-build 858c0f
                      uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Return the case folded string.
rpm-build 858c0f
   Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent
rpm-build 858c0f
   to comparing S1 and S2 with uN_casecmp().
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It can also be NULL, for no normalization.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_casefold (const uint8_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf,
rpm-build 858c0f
                    uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_casefold (const uint16_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                     uninorm_t nf,
rpm-build 858c0f
                     uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_casefold (const uint32_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                     uninorm_t nf,
rpm-build 858c0f
                     uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
/* Likewise, for a string that is surrounded by a prefix and a suffix.  */
rpm-build 858c0f
extern uint8_t *
rpm-build 858c0f
       u8_ct_casefold (const uint8_t *s, size_t n,
rpm-build 858c0f
                       casing_prefix_context_t prefix_context,
rpm-build 858c0f
                       casing_suffix_context_t suffix_context,
rpm-build 858c0f
                       const char *iso639_language,
rpm-build 858c0f
                       uninorm_t nf,
rpm-build 858c0f
                       uint8_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint16_t *
rpm-build 858c0f
       u16_ct_casefold (const uint16_t *s, size_t n,
rpm-build 858c0f
                        casing_prefix_context_t prefix_context,
rpm-build 858c0f
                        casing_suffix_context_t suffix_context,
rpm-build 858c0f
                        const char *iso639_language,
rpm-build 858c0f
                        uninorm_t nf,
rpm-build 858c0f
                        uint16_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern uint32_t *
rpm-build 858c0f
       u32_ct_casefold (const uint32_t *s, size_t n,
rpm-build 858c0f
                        casing_prefix_context_t prefix_context,
rpm-build 858c0f
                        casing_suffix_context_t suffix_context,
rpm-build 858c0f
                        const char *iso639_language,
rpm-build 858c0f
                        uninorm_t nf,
rpm-build 858c0f
                        uint32_t *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Compare S1 and S2, ignoring differences in case and normalization.
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It can also be NULL, for no normalization.
rpm-build 858c0f
   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
rpm-build 858c0f
   return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_casecmp (const uint8_t *s1, size_t n1,
rpm-build 858c0f
                   const uint8_t *s2, size_t n2,
rpm-build 858c0f
                   const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_casecmp (const uint16_t *s1, size_t n1,
rpm-build 858c0f
                    const uint16_t *s2, size_t n2,
rpm-build 858c0f
                    const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_casecmp (const uint32_t *s1, size_t n1,
rpm-build 858c0f
                    const uint32_t *s2, size_t n2,
rpm-build 858c0f
                    const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       ulc_casecmp (const char *s1, size_t n1,
rpm-build 858c0f
                    const char *s2, size_t n2,
rpm-build 858c0f
                    const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
rpm-build 858c0f
/* Convert the string S of length N to a NUL-terminated byte sequence, in such
rpm-build 858c0f
   a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib
rpm-build 858c0f
   function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll().
rpm-build 858c0f
   NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization.  */
rpm-build 858c0f
extern char *
rpm-build 858c0f
       u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                    uninorm_t nf, char *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern char *
rpm-build 858c0f
       u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                     uninorm_t nf, char *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern char *
rpm-build 858c0f
       u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                     uninorm_t nf, char *resultbuf, size_t *lengthp);
rpm-build 858c0f
extern char *
rpm-build 858c0f
       ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
rpm-build 858c0f
                     uninorm_t nf, char *resultbuf, size_t *lengthp);
rpm-build 858c0f
rpm-build 858c0f
/* Compare S1 and S2, ignoring differences in case and normalization, using the
rpm-build 858c0f
   collation rules of the current locale.
rpm-build 858c0f
   The nf argument identifies the normalization form to apply after the
rpm-build 858c0f
   case-mapping.  It must be either UNINORM_NFC or UNINORM_NFKC.  It can also
rpm-build 858c0f
   be NULL, for no normalization.
rpm-build 858c0f
   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
rpm-build 858c0f
   return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_casecoll (const uint8_t *s1, size_t n1,
rpm-build 858c0f
                    const uint8_t *s2, size_t n2,
rpm-build 858c0f
                    const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_casecoll (const uint16_t *s1, size_t n1,
rpm-build 858c0f
                     const uint16_t *s2, size_t n2,
rpm-build 858c0f
                     const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_casecoll (const uint32_t *s1, size_t n1,
rpm-build 858c0f
                     const uint32_t *s2, size_t n2,
rpm-build 858c0f
                     const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       ulc_casecoll (const char *s1, size_t n1,
rpm-build 858c0f
                     const char *s2, size_t n2,
rpm-build 858c0f
                     const char *iso639_language, uninorm_t nf, int *resultp);
rpm-build 858c0f
rpm-build 858c0f
rpm-build 858c0f
/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false
rpm-build 858c0f
   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_is_uppercase (const uint8_t *s, size_t n,
rpm-build 858c0f
                        const char *iso639_language,
rpm-build 858c0f
                        bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_is_uppercase (const uint16_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_is_uppercase (const uint32_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
rpm-build 858c0f
/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false
rpm-build 858c0f
   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_is_lowercase (const uint8_t *s, size_t n,
rpm-build 858c0f
                        const char *iso639_language,
rpm-build 858c0f
                        bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_is_lowercase (const uint16_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_is_lowercase (const uint32_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
rpm-build 858c0f
/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false
rpm-build 858c0f
   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_is_titlecase (const uint8_t *s, size_t n,
rpm-build 858c0f
                        const char *iso639_language,
rpm-build 858c0f
                        bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_is_titlecase (const uint16_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_is_titlecase (const uint32_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
rpm-build 858c0f
/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to
rpm-build 858c0f
   false otherwise, and return 0.  Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_is_casefolded (const uint8_t *s, size_t n,
rpm-build 858c0f
                         const char *iso639_language,
rpm-build 858c0f
                         bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_is_casefolded (const uint16_t *s, size_t n,
rpm-build 858c0f
                          const char *iso639_language,
rpm-build 858c0f
                          bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_is_casefolded (const uint32_t *s, size_t n,
rpm-build 858c0f
                          const char *iso639_language,
rpm-build 858c0f
                          bool *resultp);
rpm-build 858c0f
rpm-build 858c0f
/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to
rpm-build 858c0f
   either upper case or lower case or title case is not a no-op.
rpm-build 858c0f
   Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping,
rpm-build 858c0f
   under the lower case mapping, and under the title case mapping; in other
rpm-build 858c0f
   words, when NFD(S) consists entirely of caseless characters.
rpm-build 858c0f
   Upon failure, return -1 with errno set.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_is_cased (const uint8_t *s, size_t n,
rpm-build 858c0f
                    const char *iso639_language,
rpm-build 858c0f
                    bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_is_cased (const uint16_t *s, size_t n,
rpm-build 858c0f
                     const char *iso639_language,
rpm-build 858c0f
                     bool *resultp);
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_is_cased (const uint32_t *s, size_t n,
rpm-build 858c0f
                     const char *iso639_language,
rpm-build 858c0f
                     bool *resultp);
rpm-build 858c0f
rpm-build 858c0f
rpm-build 858c0f
/* ========================================================================= */
rpm-build 858c0f
rpm-build 858c0f
#ifdef __cplusplus
rpm-build 858c0f
}
rpm-build 858c0f
#endif
rpm-build 858c0f
rpm-build 858c0f
#endif /* _UNICASE_H */