dcngettext.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Implementation of the dcngettext(3) function.
  2. Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU Library General Public License as published
  5. by the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public
  12. License along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  14. USA. */
  15. #ifdef HAVE_CONFIG_H
  16. # include <config.h>
  17. #endif
  18. #include "gettextP.h"
  19. #ifdef _LIBC
  20. # include <libintl.h>
  21. #else
  22. # include "libgnuintl.h"
  23. #endif
  24. /* @@ end of prolog @@ */
  25. /* Names for the libintl functions are a problem. They must not clash
  26. with existing names and they should follow ANSI C. But this source
  27. code is also used in GNU C Library where the names have a __
  28. prefix. So we have to make a difference here. */
  29. #ifdef _LIBC
  30. # define DCNGETTEXT __dcngettext
  31. # define DCIGETTEXT __dcigettext
  32. #else
  33. # define DCNGETTEXT libintl_dcngettext
  34. # define DCIGETTEXT libintl_dcigettext
  35. #endif
  36. /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
  37. locale. */
  38. char *
  39. DCNGETTEXT (const char *domainname,
  40. const char *msgid1, const char *msgid2, unsigned long int n,
  41. int category)
  42. {
  43. return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
  44. }
  45. #ifdef _LIBC
  46. /* Alias for function name in GNU C Library. */
  47. weak_alias (__dcngettext, dcngettext);
  48. #endif