| 1 | #ifndef _LIBINTL_H | 
|---|
| 2 | #include <intl/libintl.h> | 
|---|
| 3 |  | 
|---|
| 4 | # ifndef _ISOMAC | 
|---|
| 5 |  | 
|---|
| 6 | #include <locale.h> | 
|---|
| 7 |  | 
|---|
| 8 | /* Now define the internal interfaces.  */ | 
|---|
| 9 | extern char *__gettext (const char *__msgid) | 
|---|
| 10 | __attribute_format_arg__ (1); | 
|---|
| 11 | extern char *__dgettext (const char *__domainname, | 
|---|
| 12 | const char *__msgid) | 
|---|
| 13 | __attribute_format_arg__ (2); | 
|---|
| 14 | extern char *__dcgettext (const char *__domainname, | 
|---|
| 15 | const char *__msgid, int __category) | 
|---|
| 16 | __attribute_format_arg__ (2); | 
|---|
| 17 | libc_hidden_proto (__dcgettext) | 
|---|
| 18 |  | 
|---|
| 19 | extern char *__ngettext (const char *__msgid1, const char *__msgid2, | 
|---|
| 20 | unsigned long int __n) | 
|---|
| 21 | __attribute_format_arg__ (1) __attribute_format_arg__ (2); | 
|---|
| 22 | extern char *__dngettext (const char *__domainname, | 
|---|
| 23 | const char *__msgid1, const char *__msgid2, | 
|---|
| 24 | unsigned long int __n) | 
|---|
| 25 | __attribute_format_arg__ (2) __attribute_format_arg__ (3); | 
|---|
| 26 | extern char *__dcngettext (const char *__domainname, | 
|---|
| 27 | const char *__msgid1, const char *__msgid2, | 
|---|
| 28 | unsigned long int __n, int __category) | 
|---|
| 29 | __attribute_format_arg__ (2) __attribute_format_arg__ (3); | 
|---|
| 30 |  | 
|---|
| 31 | extern char *__textdomain (const char *__domainname); | 
|---|
| 32 | extern char *__bindtextdomain (const char *__domainname, | 
|---|
| 33 | const char *__dirname); | 
|---|
| 34 | extern char *__bind_textdomain_codeset (const char *__domainname, | 
|---|
| 35 | const char *__codeset); | 
|---|
| 36 |  | 
|---|
| 37 | extern const char _libc_intl_domainname[]; | 
|---|
| 38 | libc_hidden_proto (_libc_intl_domainname) | 
|---|
| 39 |  | 
|---|
| 40 | /* _ marks its argument, a string literal, for translation, and | 
|---|
| 41 | performs translation at run time if the LC_MESSAGES locale category | 
|---|
| 42 | has been set.  The MSGID argument is extracted, added to the | 
|---|
| 43 | translation database, and eventually submitted to the translation | 
|---|
| 44 | team for processing.  New translations are periodically | 
|---|
| 45 | incorporated into the glibc source tree as part of translation | 
|---|
| 46 | updates.  */ | 
|---|
| 47 | # undef _ | 
|---|
| 48 | # define _(msgid) __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) | 
|---|
| 49 |  | 
|---|
| 50 | /* N_ marks its argument, a string literal, for translation, so that | 
|---|
| 51 | it is extracted and added to the translation database (similar to | 
|---|
| 52 | the _ macro above).  It does not translate the string at run time. | 
|---|
| 53 | The first, primary use case for N_ is a context in which a string | 
|---|
| 54 | literal is required, such as an initializer.  Translation will | 
|---|
| 55 | happen later, for example using the __gettext function. | 
|---|
| 56 |  | 
|---|
| 57 | The second, historic, use case involves strings which may be | 
|---|
| 58 | translated in a future version of the library, but cannot be | 
|---|
| 59 | translated in current releases due to some technical limitation | 
|---|
| 60 | (e.g., gettext not being available in the dynamic loader).  No | 
|---|
| 61 | translation at run time happens in such cases.  In the future, this | 
|---|
| 62 | historic usage of N_ may become deprecated.  Strings which are not | 
|---|
| 63 | translated create unnecessary work for the translation team.  We | 
|---|
| 64 | continue to use N_ because it helps mark translatable strings.  */ | 
|---|
| 65 | # undef N_ | 
|---|
| 66 | # define N_(msgid)	msgid | 
|---|
| 67 |  | 
|---|
| 68 | # endif /* !_ISOMAC */ | 
|---|
| 69 | #endif | 
|---|
| 70 |  | 
|---|