Branch
Hash :
fc59330b
Author :
Date :
2025-05-07T09:47:49
Fix "make sc_check_config_h_reminder" failure. * Makefile (config_h_MACROS2): Add _GL_ATTRIBUTE_DEALLOC_FREE, _GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_UNSEQUENCED, _GL_ATTRIBUTE_CAPABILITY_TYPE, _GL_ATTRIBUTE_ACQUIRE_CAPABILITY, _GL_ATTRIBUTE_RELEASE_CAPABILITY. (exclude_file_name_regexp--sc_check_config_h_reminder): New variable. (sc_check_config_h_reminder): Use it. * lib/areadlink.h: Add <config.h> reminder. * lib/crc.h: Likewise. * lib/crc-x86_64.h: Likewise. * lib/diffseq.h: Likewise. * lib/gl_sublist.h: Likewise. * lib/signed-nan.h: Likewise. * lib/signed-snan.h: Likewise. * lib/snan.h: Likewise. * lib/unicase/special-casing.in.h: Likewise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
/* Special casing table.
Copyright (C) 2009-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
You can redistribute it and/or modify it under either
- the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3, or (at your
option) any later version, or
- the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option)
any later version, or
- the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
This file 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 and the GNU General Public License
for more details.
You should have received a copy of the GNU Lesser General Public
License and of the GNU General Public License along with this
program. If not, see <https://www.gnu.org/licenses/>. */
/* This file uses _GL_ATTRIBUTE_NONSTRING. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* 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] _GL_ATTRIBUTE_NONSTRING;
/* 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);
#ifdef __cplusplus
}
#endif