Blame intl/libintl.h

Packit 6c4009
/* Message catalogs for internationalization.
Packit 6c4009
   Copyright (C) 1995-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
   This file is derived from the file libgettext.h in the GNU gettext package.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _LIBINTL_H
Packit 6c4009
#define _LIBINTL_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
Packit 6c4009
/* We define an additional symbol to signal that we use the GNU
Packit 6c4009
   implementation of gettext.  */
Packit 6c4009
#define __USE_GNU_GETTEXT 1
Packit 6c4009
Packit 6c4009
/* Provide information about the supported file formats.  Returns the
Packit 6c4009
   maximum minor revision number supported for a given major revision.  */
Packit 6c4009
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
Packit 6c4009
  ((major) == 0 ? 1 : -1)
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* Look up MSGID in the current default message catalog for the current
Packit 6c4009
   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
Packit 6c4009
   text).  */
Packit 6c4009
extern char *gettext (const char *__msgid)
Packit 6c4009
     __THROW __attribute_format_arg__ (1);
Packit 6c4009
Packit 6c4009
/* Look up MSGID in the DOMAINNAME message catalog for the current
Packit 6c4009
   LC_MESSAGES locale.  */
Packit 6c4009
extern char *dgettext (const char *__domainname, const char *__msgid)
Packit 6c4009
     __THROW __attribute_format_arg__ (2);
Packit 6c4009
extern char *__dgettext (const char *__domainname, const char *__msgid)
Packit 6c4009
     __THROW __attribute_format_arg__ (2);
Packit 6c4009
Packit 6c4009
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
Packit 6c4009
   locale.  */
Packit 6c4009
extern char *dcgettext (const char *__domainname,
Packit 6c4009
			const char *__msgid, int __category)
Packit 6c4009
     __THROW __attribute_format_arg__ (2);
Packit 6c4009
extern char *__dcgettext (const char *__domainname,
Packit 6c4009
			  const char *__msgid, int __category)
Packit 6c4009
     __THROW __attribute_format_arg__ (2);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Similar to `gettext' but select the plural form corresponding to the
Packit 6c4009
   number N.  */
Packit 6c4009
extern char *ngettext (const char *__msgid1, const char *__msgid2,
Packit 6c4009
		       unsigned long int __n)
Packit 6c4009
     __THROW __attribute_format_arg__ (1) __attribute_format_arg__ (2);
Packit 6c4009
Packit 6c4009
/* Similar to `dgettext' but select the plural form corresponding to the
Packit 6c4009
   number N.  */
Packit 6c4009
extern char *dngettext (const char *__domainname, const char *__msgid1,
Packit 6c4009
			const char *__msgid2, unsigned long int __n)
Packit 6c4009
     __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
Packit 6c4009
Packit 6c4009
/* Similar to `dcgettext' but select the plural form corresponding to the
Packit 6c4009
   number N.  */
Packit 6c4009
extern char *dcngettext (const char *__domainname, const char *__msgid1,
Packit 6c4009
			 const char *__msgid2, unsigned long int __n,
Packit 6c4009
			 int __category)
Packit 6c4009
     __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Set the current default message catalog to DOMAINNAME.
Packit 6c4009
   If DOMAINNAME is null, return the current default.
Packit 6c4009
   If DOMAINNAME is "", reset to the default of "messages".  */
Packit 6c4009
extern char *textdomain (const char *__domainname) __THROW;
Packit 6c4009
Packit 6c4009
/* Specify that the DOMAINNAME message catalog will be found
Packit 6c4009
   in DIRNAME rather than in the system locale data base.  */
Packit 6c4009
extern char *bindtextdomain (const char *__domainname,
Packit 6c4009
			     const char *__dirname) __THROW;
Packit 6c4009
Packit 6c4009
/* Specify the character encoding in which the messages from the
Packit 6c4009
   DOMAINNAME message catalog will be returned.  */
Packit 6c4009
extern char *bind_textdomain_codeset (const char *__domainname,
Packit 6c4009
				      const char *__codeset) __THROW;
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Optimized version of the function above.  */
Packit 6c4009
#if defined __OPTIMIZE__ && !defined __cplusplus
Packit 6c4009
Packit 6c4009
/* We need NULL for `gettext'.  */
Packit 6c4009
# define __need_NULL
Packit 6c4009
# include <stddef.h>
Packit 6c4009
Packit 6c4009
/* We need LC_MESSAGES for `dgettext'.  */
Packit 6c4009
# include <locale.h>
Packit 6c4009
Packit 6c4009
/* These must be macros.  Inlined functions are useless because the
Packit 6c4009
   `__builtin_constant_p' predicate in dcgettext would always return
Packit 6c4009
   false.  */
Packit 6c4009
Packit 6c4009
# define gettext(msgid) dgettext (NULL, msgid)
Packit 6c4009
Packit 6c4009
# define dgettext(domainname, msgid) \
Packit 6c4009
  dcgettext (domainname, msgid, LC_MESSAGES)
Packit 6c4009
Packit 6c4009
# define ngettext(msgid1, msgid2, n) dngettext (NULL, msgid1, msgid2, n)
Packit 6c4009
Packit 6c4009
# define dngettext(domainname, msgid1, msgid2, n) \
Packit 6c4009
  dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
Packit 6c4009
Packit 6c4009
#endif	/* Optimizing.  */
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* libintl.h */