annotate intl/dcgettext.c @ 2093:b05046902327 trunk

[svn] Oops. controlsocket.c is *much* happier now that the arguments are in the right order. >.>
author kiyoshi
date Mon, 11 Dec 2006 04:53:17 -0800
parents 705d4c089fce
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* Implementation of the dcgettext(3) function.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify it
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 under the terms of the GNU Library General Public License as published
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 by the Free Software Foundation; either version 2, or (at your option)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 Library General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 You should have received a copy of the GNU Library General Public
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 License along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 USA. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 #ifdef HAVE_CONFIG_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 # include <config.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #include "gettextP.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #ifdef _LIBC
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 # include <libintl.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 #else
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 # include "libgnuintl.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 /* @@ end of prolog @@ */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 /* Names for the libintl functions are a problem. They must not clash
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 with existing names and they should follow ANSI C. But this source
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 code is also used in GNU C Library where the names have a __
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 prefix. So we have to make a difference here. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 #ifdef _LIBC
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 # define DCGETTEXT __dcgettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 # define DCIGETTEXT __dcigettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 #else
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 # define DCGETTEXT libintl_dcgettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 # define DCIGETTEXT libintl_dcigettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 locale. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 DCGETTEXT (domainname, msgid, category)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 const char *msgid;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 int category;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 #ifdef _LIBC
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 /* Alias for function name in GNU C Library. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 INTDEF(__dcgettext)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 weak_alias (__dcgettext, dcgettext);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 #endif