]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/intl.h
x86: Remove "%!" before ret
[thirdparty/gcc.git] / gcc / intl.h
CommitLineData
e44d06c3 1/* intl.h - internationalization
99dee823 2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
e44d06c3
JL
3
4 GCC is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
9dcd6f09 6 the Free Software Foundation; either version 3, or (at your option)
e44d06c3
JL
7 any later version.
8
9 GCC is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
9dcd6f09
NC
15 along with GCC; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
e44d06c3 17
191bf464
ZW
18#ifndef GCC_INTL_H
19#define GCC_INTL_H
20
e44d06c3
JL
21#ifdef HAVE_LOCALE_H
22# include <locale.h>
23#endif
24
25#ifndef HAVE_SETLOCALE
26# define setlocale(category, locale) (locale)
27#endif
28
191bf464 29#ifdef ENABLE_NLS
4fbfcf44 30#include <libintl.h>
3d7aafde
AJ
31extern void gcc_init_libintl (void);
32extern size_t gcc_gettext_width (const char *);
191bf464
ZW
33#else
34/* Stubs. */
35# undef textdomain
e44d06c3 36# define textdomain(domain) (domain)
191bf464 37# undef bindtextdomain
e44d06c3 38# define bindtextdomain(domain, directory) (domain)
191bf464 39# undef gettext
e44d06c3 40# define gettext(msgid) (msgid)
c3284718 41# define ngettext(singular,plural,n) fake_ngettext (singular, plural, n)
191bf464 42# define gcc_init_libintl() /* nothing */
c3284718 43# define gcc_gettext_width(s) strlen (s)
0f667308 44
c3284718
RS
45extern const char *fake_ngettext (const char *singular, const char *plural,
46 unsigned long int n);
0f667308 47
e44d06c3
JL
48#endif
49
1ff863ab 50/* Used to immediately translate the argument. */
e44d06c3
JL
51#ifndef _
52# define _(msgid) gettext (msgid)
53#endif
54
1ff863ab 55/* Used to mark strings that will be translated later. */
e44d06c3 56#ifndef N_
9a57322b 57# define N_(msgid) msgid
e44d06c3 58#endif
191bf464 59
1ff863ab
JM
60/* Like N_, but for GCC diagnostic format strings. See ABOUT-GCC-NLS for
61 details. */
4b794eaf
JJ
62#ifndef G_
63# define G_(gmsgid) gmsgid
64#endif
65
6ba6f70d
PB
66extern char *get_spaces (const char *);
67
a668adb2
JM
68extern const char *open_quote;
69extern const char *close_quote;
a3af5087
JM
70extern const char *locale_encoding;
71extern bool locale_utf8;
a668adb2 72
191bf464 73#endif /* intl.h */