Files
glibc/intl/ngettext.c
T

70 lines
2.0 KiB
C
Raw Normal View History

2000-01-22 05:50:49 +00:00
/* Implementation of ngettext(3) function.
2002-04-09 20:36:24 +00:00
Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
2001-07-06 04:58:11 +00:00
This file is part of the GNU C Library.
2000-01-22 05:50:49 +00:00
The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
2000-01-22 05:50:49 +00:00
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
Lesser General Public License for more details.
2000-01-22 05:50:49 +00:00
2001-07-06 04:58:11 +00:00
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
2000-01-22 05:50:49 +00:00
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef _LIBC
# define __need_NULL
# include <stddef.h>
#else
2001-11-28 00:09:26 +00:00
# include <stdlib.h> /* Just for NULL. */
2000-01-22 05:50:49 +00:00
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
2001-03-20 01:00:20 +00:00
# include "libgnuintl.h"
2000-01-22 05:50:49 +00:00
#endif
2000-04-06 05:04:50 +00:00
#include <locale.h>
2000-01-22 05:50:49 +00:00
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define NGETTEXT __ngettext
2002-05-01 17:09:58 +00:00
# define DCNGETTEXT __dcngettext
2000-01-22 05:50:49 +00:00
#else
2002-12-11 22:59:29 +00:00
# define NGETTEXT libintl_ngettext
# define DCNGETTEXT libintl_dcngettext
2000-01-22 05:50:49 +00:00
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
NGETTEXT (msgid1, msgid2, n)
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__ngettext, ngettext);
#endif