11.6Schristos/*	$NetBSD: libintl.h,v 1.8 2015/06/08 15:04:20 christos Exp $	*/
21.1Sitojun
31.1Sitojun/*-
41.1Sitojun * Copyright (c) 2000 Citrus Project,
51.1Sitojun * All rights reserved.
61.1Sitojun *
71.1Sitojun * Redistribution and use in source and binary forms, with or without
81.1Sitojun * modification, are permitted provided that the following conditions
91.1Sitojun * are met:
101.1Sitojun * 1. Redistributions of source code must retain the above copyright
111.1Sitojun *    notice, this list of conditions and the following disclaimer.
121.1Sitojun * 2. Redistributions in binary form must reproduce the above copyright
131.1Sitojun *    notice, this list of conditions and the following disclaimer in the
141.1Sitojun *    documentation and/or other materials provided with the distribution.
151.1Sitojun *
161.1Sitojun * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
171.1Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
181.1Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
191.1Sitojun * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
201.1Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
211.1Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
221.1Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
231.1Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
241.1Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
251.1Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261.1Sitojun * SUCH DAMAGE.
271.1Sitojun */
281.1Sitojun
291.6Schristos#ifndef _LIBINTL_H_
301.6Schristos#define _LIBINTL_H_
311.1Sitojun
321.1Sitojun#include <sys/cdefs.h>
331.1Sitojun
341.8Schristos#ifndef _LIBGETTEXT_H
351.8Schristos/*
361.8Schristos * Avoid defining these if the GNU gettext compatibility header includes
371.8Schristos * us, since it re-defines those unconditionally and creates inline functions
381.8Schristos * for some of them. This is horrible.
391.8Schristos */
401.8Schristos#define pgettext_expr(msgctxt, msgid) pgettext((msgctxt), (msgid))
411.8Schristos#define dpgettext_expr(domainname, msgctxt, msgid) \
421.8Schristos    dpgettext((domainname), (msgctxt), (msgid))
431.8Schristos#define dcpgettext_expr(domainname, msgctxt, msgid, category) \
441.8Schristos    dcpgettext((domainname), (msgctxt), (msgid), (category))
451.8Schristos#define npgettext_expr(msgctxt, msgid1, msgid2, n) \
461.8Schristos    npgettext((msgctxt), (msgid1), (msgid2), (n))
471.8Schristos#define dnpgettext_expr(domainname, msgctxt, msgid1, n) \
481.8Schristos    dnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n))
491.8Schristos#define dcnpgettext_expr(domainname, msgctxt, msgid1, msgid2, n, category) \
501.8Schristos    dcnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n), (category))
511.8Schristos#endif
521.5Schristos
531.2Sitojun__BEGIN_DECLS
541.4Sjoergchar *gettext(const char *) __format_arg(1);
551.4Sjoergchar *dgettext(const char *, const char *) __format_arg(2);
561.4Sjoergchar *dcgettext(const char *, const char *, int) __format_arg(2);
571.4Sjoergchar *ngettext(const char *, const char *, unsigned long int)
581.5Schristos	       __format_arg(1) __format_arg(2);
591.4Sjoergchar *dngettext(const char *, const char *, const char *, unsigned long int)
601.5Schristos		__format_arg(2) __format_arg(3);
611.3Sjunyoungchar *dcngettext(const char *, const char *, const char *, unsigned long int,
621.5Schristos		 int) __format_arg(2) __format_arg(3);
631.5Schristosconst char *pgettext(const char *, const char *) __format_arg(2);
641.5Schristosconst char *dpgettext(const char *, const char *, const char *)
651.5Schristos		      __format_arg(3);
661.5Schristosconst char *dcpgettext(const char *, const char *, const char *, int)
671.5Schristos		       __format_arg(3);
681.5Schristosconst char *npgettext(const char *, const char *, const char *,
691.5Schristos		      unsigned long int) __format_arg(2) __format_arg(3);
701.5Schristosconst char *dnpgettext(const char *, const char *, const char *,
711.5Schristos		       const char *, unsigned long int) __format_arg(3)
721.5Schristos		       __format_arg(4);
731.5Schristosconst char *dcnpgettext(const char *, const char *, const char *,
741.5Schristos			const char *, unsigned long int, int) __format_arg(3)
751.5Schristos			__format_arg(4);
761.3Sjunyoung
771.3Sjunyoungchar *textdomain(const char *);
781.3Sjunyoungchar *bindtextdomain(const char *, const char *);
791.3Sjunyoungchar *bind_textdomain_codeset(const char *, const char *);
801.7Schristos
811.2Sitojun__END_DECLS
821.1Sitojun
831.6Schristos#endif /* _LIBINTL_H_ */
84