.
[glibc/history.git] / include / libintl.h
blob8875c9444f431b1871aca6ca54c32a4e7b6518c5
1 #ifndef _LIBINTL_H
2 #include <intl/libintl.h>
3 #include <locale.h>
5 /* Now define the internal interfaces. */
6 extern char *__gettext (__const char *__msgid)
7 __attribute_format_arg__ (1);
8 extern char *__dgettext (__const char *__domainname,
9 __const char *__msgid)
10 __attribute_format_arg__ (2);
11 extern char *__dcgettext (__const char *__domainname,
12 __const char *__msgid, int __category)
13 __attribute_format_arg__ (2);
14 libc_hidden_proto (__dcgettext)
15 extern char *__dcgettext_internal (__const char *__domainname,
16 __const char *__msgid, int __category)
17 __attribute_format_arg__ (2)
18 attribute_hidden;
20 extern char *__ngettext (__const char *__msgid1, __const char *__msgid2,
21 unsigned long int __n)
22 __attribute_format_arg__ (1) __attribute_format_arg__ (2);
23 extern char *__dngettext (__const char *__domainname,
24 __const char *__msgid1, __const char *__msgid2,
25 unsigned long int __n)
26 __attribute_format_arg__ (2) __attribute_format_arg__ (3);
27 extern char *__dcngettext (__const char *__domainname,
28 __const char *__msgid1, __const char *__msgid2,
29 unsigned long int __n, int __category)
30 __attribute_format_arg__ (2) __attribute_format_arg__ (3);
31 extern char *__dcngettext_internal (__const char *__domainname,
32 __const char *__msgid1,
33 __const char *__msgid2,
34 unsigned long int __n, int __category)
35 __attribute_format_arg__ (2) __attribute_format_arg__ (3)
36 attribute_hidden;
38 extern char *__textdomain (__const char *__domainname);
39 extern char *__bindtextdomain (__const char *__domainname,
40 __const char *__dirname);
41 extern char *__bind_textdomain_codeset (__const char *__domainname,
42 __const char *__codeset);
44 extern const char _libc_intl_domainname[];
45 libc_hidden_proto (_libc_intl_domainname)
47 /* Define the macros `_' and `N_' for conveniently marking translatable
48 strings in the libc source code. We have to make sure we get the
49 correct definitions so we undefine the macros first. */
51 # undef N_
52 # define N_(msgid) msgid
54 # undef _
55 /* This is defined as an optimizing macro, so use it. */
56 # define _(msgid) \
57 __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
59 #endif