Back to index

glibc  2.9
libintl.h
Go to the documentation of this file.
00001 #ifndef _LIBINTL_H
00002 #include <intl/libintl.h>
00003 #include <locale.h>
00004 
00005 /* Now define the internal interfaces.  */
00006 extern char *__gettext (__const char *__msgid)
00007      __attribute_format_arg__ (1);
00008 extern char *__dgettext (__const char *__domainname,
00009                       __const char *__msgid)
00010      __attribute_format_arg__ (2);
00011 extern char *__dcgettext (__const char *__domainname,
00012                        __const char *__msgid, int __category)
00013      __attribute_format_arg__ (2);
00014 libc_hidden_proto (__dcgettext)
00015 extern char *__dcgettext_internal (__const char *__domainname,
00016                                __const char *__msgid, int __category)
00017      __attribute_format_arg__ (2)
00018      attribute_hidden;
00019 
00020 extern char *__ngettext (__const char *__msgid1, __const char *__msgid2,
00021                       unsigned long int __n)
00022      __attribute_format_arg__ (1) __attribute_format_arg__ (2);
00023 extern char *__dngettext (__const char *__domainname,
00024                        __const char *__msgid1, __const char *__msgid2,
00025                        unsigned long int __n)
00026      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
00027 extern char *__dcngettext (__const char *__domainname,
00028                         __const char *__msgid1, __const char *__msgid2,
00029                         unsigned long int __n, int __category)
00030      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
00031 extern char *__dcngettext_internal (__const char *__domainname,
00032                                 __const char *__msgid1,
00033                                 __const char *__msgid2,
00034                                 unsigned long int __n, int __category)
00035      __attribute_format_arg__ (2) __attribute_format_arg__ (3)
00036      attribute_hidden;
00037 
00038 extern char *__textdomain (__const char *__domainname);
00039 extern char *__bindtextdomain (__const char *__domainname,
00040                             __const char *__dirname);
00041 extern char *__bind_textdomain_codeset (__const char *__domainname,
00042                                    __const char *__codeset);
00043 
00044 extern const char _libc_intl_domainname[];
00045 libc_hidden_proto (_libc_intl_domainname)
00046 
00047 /* Define the macros `_' and `N_' for conveniently marking translatable
00048    strings in the libc source code.  We have to make sure we get the
00049    correct definitions so we undefine the macros first.  */
00050 
00051 # undef N_
00052 # define N_(msgid)   msgid
00053 
00054 # undef _
00055 /* This is defined as an optimizing macro, so use it.  */
00056 # define _(msgid) \
00057   __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
00058 
00059 #endif