1*36dcc4a4SLionel Sambuc /* $NetBSD: libintl.h,v 1.8 2015/06/08 15:04:20 christos Exp $ */ 2*36dcc4a4SLionel Sambuc 3*36dcc4a4SLionel Sambuc /*- 4*36dcc4a4SLionel Sambuc * Copyright (c) 2000 Citrus Project, 5*36dcc4a4SLionel Sambuc * All rights reserved. 6*36dcc4a4SLionel Sambuc * 7*36dcc4a4SLionel Sambuc * Redistribution and use in source and binary forms, with or without 8*36dcc4a4SLionel Sambuc * modification, are permitted provided that the following conditions 9*36dcc4a4SLionel Sambuc * are met: 10*36dcc4a4SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 11*36dcc4a4SLionel Sambuc * notice, this list of conditions and the following disclaimer. 12*36dcc4a4SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 13*36dcc4a4SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 14*36dcc4a4SLionel Sambuc * documentation and/or other materials provided with the distribution. 15*36dcc4a4SLionel Sambuc * 16*36dcc4a4SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17*36dcc4a4SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*36dcc4a4SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*36dcc4a4SLionel Sambuc * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20*36dcc4a4SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*36dcc4a4SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*36dcc4a4SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*36dcc4a4SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*36dcc4a4SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*36dcc4a4SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*36dcc4a4SLionel Sambuc * SUCH DAMAGE. 27*36dcc4a4SLionel Sambuc */ 28*36dcc4a4SLionel Sambuc 29*36dcc4a4SLionel Sambuc #ifndef _LIBINTL_H_ 30*36dcc4a4SLionel Sambuc #define _LIBINTL_H_ 31*36dcc4a4SLionel Sambuc 32*36dcc4a4SLionel Sambuc #include <sys/cdefs.h> 33*36dcc4a4SLionel Sambuc 34*36dcc4a4SLionel Sambuc #ifndef _LIBGETTEXT_H 35*36dcc4a4SLionel Sambuc /* 36*36dcc4a4SLionel Sambuc * Avoid defining these if the GNU gettext compatibility header includes 37*36dcc4a4SLionel Sambuc * us, since it re-defines those unconditionally and creates inline functions 38*36dcc4a4SLionel Sambuc * for some of them. This is horrible. 39*36dcc4a4SLionel Sambuc */ 40*36dcc4a4SLionel Sambuc #define pgettext_expr(msgctxt, msgid) pgettext((msgctxt), (msgid)) 41*36dcc4a4SLionel Sambuc #define dpgettext_expr(domainname, msgctxt, msgid) \ 42*36dcc4a4SLionel Sambuc dpgettext((domainname), (msgctxt), (msgid)) 43*36dcc4a4SLionel Sambuc #define dcpgettext_expr(domainname, msgctxt, msgid, category) \ 44*36dcc4a4SLionel Sambuc dcpgettext((domainname), (msgctxt), (msgid), (category)) 45*36dcc4a4SLionel Sambuc #define npgettext_expr(msgctxt, msgid1, msgid2, n) \ 46*36dcc4a4SLionel Sambuc npgettext((msgctxt), (msgid1), (msgid2), (n)) 47*36dcc4a4SLionel Sambuc #define dnpgettext_expr(domainname, msgctxt, msgid1, n) \ 48*36dcc4a4SLionel Sambuc dnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n)) 49*36dcc4a4SLionel Sambuc #define dcnpgettext_expr(domainname, msgctxt, msgid1, msgid2, n, category) \ 50*36dcc4a4SLionel Sambuc dcnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n), (category)) 51*36dcc4a4SLionel Sambuc #endif 52*36dcc4a4SLionel Sambuc 53*36dcc4a4SLionel Sambuc __BEGIN_DECLS 54*36dcc4a4SLionel Sambuc char *gettext(const char *) __format_arg(1); 55*36dcc4a4SLionel Sambuc char *dgettext(const char *, const char *) __format_arg(2); 56*36dcc4a4SLionel Sambuc char *dcgettext(const char *, const char *, int) __format_arg(2); 57*36dcc4a4SLionel Sambuc char *ngettext(const char *, const char *, unsigned long int) 58*36dcc4a4SLionel Sambuc __format_arg(1) __format_arg(2); 59*36dcc4a4SLionel Sambuc char *dngettext(const char *, const char *, const char *, unsigned long int) 60*36dcc4a4SLionel Sambuc __format_arg(2) __format_arg(3); 61*36dcc4a4SLionel Sambuc char *dcngettext(const char *, const char *, const char *, unsigned long int, 62*36dcc4a4SLionel Sambuc int) __format_arg(2) __format_arg(3); 63*36dcc4a4SLionel Sambuc const char *pgettext(const char *, const char *) __format_arg(2); 64*36dcc4a4SLionel Sambuc const char *dpgettext(const char *, const char *, const char *) 65*36dcc4a4SLionel Sambuc __format_arg(3); 66*36dcc4a4SLionel Sambuc const char *dcpgettext(const char *, const char *, const char *, int) 67*36dcc4a4SLionel Sambuc __format_arg(3); 68*36dcc4a4SLionel Sambuc const char *npgettext(const char *, const char *, const char *, 69*36dcc4a4SLionel Sambuc unsigned long int) __format_arg(2) __format_arg(3); 70*36dcc4a4SLionel Sambuc const char *dnpgettext(const char *, const char *, const char *, 71*36dcc4a4SLionel Sambuc const char *, unsigned long int) __format_arg(3) 72*36dcc4a4SLionel Sambuc __format_arg(4); 73*36dcc4a4SLionel Sambuc const char *dcnpgettext(const char *, const char *, const char *, 74*36dcc4a4SLionel Sambuc const char *, unsigned long int, int) __format_arg(3) 75*36dcc4a4SLionel Sambuc __format_arg(4); 76*36dcc4a4SLionel Sambuc 77*36dcc4a4SLionel Sambuc char *textdomain(const char *); 78*36dcc4a4SLionel Sambuc char *bindtextdomain(const char *, const char *); 79*36dcc4a4SLionel Sambuc char *bind_textdomain_codeset(const char *, const char *); 80*36dcc4a4SLionel Sambuc 81*36dcc4a4SLionel Sambuc __END_DECLS 82*36dcc4a4SLionel Sambuc 83*36dcc4a4SLionel Sambuc #endif /* _LIBINTL_H_ */ 84