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