dcngettext.c 1.8 KB

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