1 /* Copyright (C) 2003 Manuel Novoa III
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free
15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 * Stub version of libintl.
29 /**********************************************************************/
32 char *gettext(const char *msgid)
34 return (char *) msgid;
38 /**********************************************************************/
41 char *__dgettext(const char *domainname,
44 return (char *) msgid;
47 weak_alias (__dgettext, dgettext)
50 /**********************************************************************/
53 char * __dcgettext(const char *domainname,
54 const char *msgid, int category)
56 return (char *) msgid;
59 weak_alias (__dcgettext, dcgettext)
62 /**********************************************************************/
65 char *ngettext(const char *msgid1, const char *msgid2,
68 return (char *) ((n == 1) ? msgid1 : msgid2);
72 /**********************************************************************/
75 char *dngettext(const char *domainname, const char *msgid1,
76 const char *msgid2, unsigned long int n)
78 return (char *) ((n == 1) ? msgid1 : msgid2);
82 /**********************************************************************/
85 char *dcngettext(const char *domainname, const char *msgid1,
86 const char *msgid2, unsigned long int n,
89 return (char *) ((n == 1) ? msgid1 : msgid2);
93 /**********************************************************************/
96 char *textdomain(const char *domainname)
98 static const char default_str[] = "messages";
100 if (domainname && *domainname && strcmp(domainname, default_str)) {
104 return (char *) default_str;
108 /**********************************************************************/
109 #ifdef L_bindtextdomain
111 char *bindtextdomain(const char *domainname, const char *dirname)
113 static const char dir[] = "/";
115 if (!domainname || !*domainname
118 && ((dirname[0] != '/') || dirname[1])
120 && strcmp(dirname, dir)
132 /**********************************************************************/
133 #ifdef L_bind_textdomain_codeset
135 /* Specify the character encoding in which the messages from the
136 DOMAINNAME message catalog will be returned. */
137 char *bind_textdomain_codeset(const char *domainname,
140 if (!domainname || !*domainname || codeset) {
147 /**********************************************************************/
148 #ifdef L__nl_expand_alias
152 const char *_nl_expand_alias(const char * name)
154 return NULL; /* uClibc does not support locale aliases. */
158 /**********************************************************************/
159 #ifdef L__nl_msg_cat_cntr
163 int _nl_msg_cat_cntr = 0;
166 /**********************************************************************/