gettext: Sync with gettext 0.23.
[gnulib.git] / lib / uniname.in.h
blobe5d6ee6363072f1d4a61a352cd0c7ca1fb9eb764
1 /* Association between Unicode characters and their names.
2 Copyright (C) 2000-2002, 2005, 2007, 2009-2024 Free Software Foundation,
3 Inc.
5 This file is free software.
6 It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
7 You can redistribute it and/or modify it under either
8 - the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation, either version 3, or (at your
10 option) any later version, or
11 - the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2, or (at your option)
13 any later version, or
14 - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
16 This file is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License and the GNU General Public License
20 for more details.
22 You should have received a copy of the GNU Lesser General Public
23 License and of the GNU General Public License along with this
24 program. If not, see <https://www.gnu.org/licenses/>. */
26 #ifndef _UNINAME_H
27 #define _UNINAME_H
29 #include "unitypes.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 /* Required size of buffer for a Unicode character name. */
36 #define UNINAME_MAX 256
38 /* Looks up the name of a Unicode character, in uppercase ASCII.
39 Returns the filled buf, or NULL if the character does not have a name. */
40 extern char *
41 unicode_character_name (ucs4_t uc, char *buf);
43 /* Looks up the Unicode character with a given name, in upper- or lowercase
44 ASCII. Returns the character if found, or UNINAME_INVALID if not found. */
45 extern ucs4_t
46 unicode_name_character (const char *name)
47 _UC_ATTRIBUTE_PURE;
48 #define UNINAME_INVALID ((ucs4_t) 0xFFFF)
50 #ifdef __cplusplus
52 #endif
54 #endif /* _UNINAME_H */