diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:50:11 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:50:11 +0100 | 
| commit | 4cf52fc0bc3b80c0ef6c58c5db4413ebdafe661c (patch) | |
| tree | 676b26b024117cf656080a011e3d17b8fb6889af /lib/unicase/special-casing.in.h | |
| parent | 1ecbfbb92248e67b564f5b144c4671ccaa86ee2f (diff) | |
| parent | 44ff3127b1e57b703c2a73a24f7ab38e4aad8ae4 (diff) | |
Merge branch 'release/0.9.8-1'0.9.8-1
Diffstat (limited to 'lib/unicase/special-casing.in.h')
| -rw-r--r-- | lib/unicase/special-casing.in.h | 70 | 
1 files changed, 70 insertions, 0 deletions
| diff --git a/lib/unicase/special-casing.in.h b/lib/unicase/special-casing.in.h new file mode 100644 index 00000000..d98049b6 --- /dev/null +++ b/lib/unicase/special-casing.in.h @@ -0,0 +1,70 @@ +/* Special casing table. +   Copyright (C) 2009-2017 Free Software Foundation, Inc. +   Written by Bruno Haible <bruno@clisp.org>, 2009. + +   This program is free software: you can redistribute it and/or +   modify it under the terms of either: + +     * the GNU Lesser General Public License as published by the Free +       Software Foundation; either version 3 of the License, or (at your +       option) any later version. + +   or + +     * the GNU General Public License as published by the Free +       Software Foundation; either version 2 of the License, or (at your +       option) any later version. + +   or both in parallel, as here. +   This program is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public License +   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */ + +#include <stddef.h> + +/* A special casing context. +   A context is negated through x -> -x.  */ +enum +{ +  SCC_ALWAYS             = 0, +  SCC_FINAL_SIGMA        = 1, +  SCC_AFTER_SOFT_DOTTED  = 2, +  SCC_MORE_ABOVE         = 3, +  SCC_BEFORE_DOT         = 4, +  SCC_AFTER_I            = 5 +}; + +struct special_casing_rule +{ +  /* The first two bytes are the code, in big-endian order.  The third byte +     only distinguishes different rules pertaining to the same code.  */ +  /*unsigned*/ char code[3]; + +  /* True when this rule is not the last one for the given code.  */ +  /*bool*/ unsigned int has_next : 1; + +  /* Context.  */ +  signed int context : 7; + +  /* Language, or an empty string.  */ +  char language[2]; + +  /* Mapping to upper case.  Between 0 and 3 characters.  Filled with 0s.  */ +  unsigned short upper[3]; + +  /* Mapping to lower case.  Between 0 and 3 characters.  Filled with 0s.  */ +  unsigned short lower[3]; + +  /* Mapping to title case.  Between 0 and 3 characters.  Filled with 0s.  */ +  unsigned short title[3]; + +  /* Casefolding mapping.  Between 0 and 3 characters.  Filled with 0s.  */ +  unsigned short casefold[3]; +}; + +extern const struct special_casing_rule * +       gl_unicase_special_lookup (const char *str, size_t len); | 
