Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

ngettext.c

00001 /* Implementation of ngettext(3) function.
00002    Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
00003 
00004    This program is free software; you can redistribute it and/or modify it
00005    under the terms of the GNU Library General Public License as published
00006    by the Free Software Foundation; either version 2, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public
00015    License along with this program; if not, write to the Free Software
00016    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00017    USA.  */
00018 
00019 #ifdef HAVE_CONFIG_H
00020 # include <config.h>
00021 #endif
00022 
00023 #ifdef _LIBC
00024 # define __need_NULL
00025 # include <stddef.h>
00026 #else
00027 # include <stdlib.h>            /* Just for NULL.  */
00028 #endif
00029 
00030 #include "gettextP.h"
00031 #ifdef _LIBC
00032 # include <libintl.h>
00033 #else
00034 # include "libgnuintl.h"
00035 #endif
00036 
00037 #include <locale.h>
00038 
00039 /* @@ end of prolog @@ */
00040 
00041 /* Names for the libintl functions are a problem.  They must not clash
00042    with existing names and they should follow ANSI C.  But this source
00043    code is also used in GNU C Library where the names have a __
00044    prefix.  So we have to make a difference here.  */
00045 #ifdef _LIBC
00046 # define NGETTEXT __ngettext
00047 # define DCNGETTEXT __dcngettext
00048 #else
00049 # define NGETTEXT ngettext__
00050 # define DCNGETTEXT dcngettext__
00051 #endif
00052 
00053 /* Look up MSGID in the current default message catalog for the current
00054    LC_MESSAGES locale.  If not found, returns MSGID itself (the default
00055    text).  */
00056 char *
00057 NGETTEXT (msgid1, msgid2, n)
00058      const char *msgid1;
00059      const char *msgid2;
00060      unsigned long int n;
00061 {
00062   return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
00063 }
00064 
00065 #ifdef _LIBC
00066 /* Alias for function name in GNU C Library.  */
00067 weak_alias (__ngettext, ngettext);
00068 #endif

Generated on Sun Feb 16 23:39:49 2003 for FreeLCD by doxygen1.2.18