Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / contrib / idn / idnkit-1.0-src / include / mdn / api.h
blobfa276c11b36f7b706a449c30ef804372d4bdba9f
1 /* $NetBSD: api.h,v 1.4 2014/12/10 04:37:55 christos Exp $ */
3 /* Id: api.h,v 1.1 2003/06/04 00:25:45 marka Exp */
4 /*
5 * Copyright (c) 2001,2002 Japan Network Information Center.
6 * All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set forth bellow.
9 *
10 * LICENSE TERMS AND CONDITIONS
12 * The following License Terms and Conditions apply, unless a different
13 * license is obtained from Japan Network Information Center ("JPNIC"),
14 * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
15 * Chiyoda-ku, Tokyo 101-0047, Japan.
17 * 1. Use, Modification and Redistribution (including distribution of any
18 * modified or derived work) in source and/or binary forms is permitted
19 * under this License Terms and Conditions.
21 * 2. Redistribution of source code must retain the copyright notices as they
22 * appear in each source code file, this License Terms and Conditions.
24 * 3. Redistribution in binary form must reproduce the Copyright Notice,
25 * this License Terms and Conditions, in the documentation and/or other
26 * materials provided with the distribution. For the purposes of binary
27 * distribution the "Copyright Notice" refers to the following language:
28 * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
30 * 4. The name of JPNIC may not be used to endorse or promote products
31 * derived from this Software without specific prior written approval of
32 * JPNIC.
34 * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
35 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
38 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
41 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
43 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
44 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
47 #ifndef MDN_API_H
48 #define MDN_API_H 1
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
54 #include <mdn/result.h>
55 #include <mdn/res.h>
56 #include <idn/api.h>
58 #define mdn_enable idn_enable
60 extern idn_result_t
61 mdn_nameinit(void);
63 extern idn_result_t
64 mdn_encodename(int actions, const char *from, char *to, size_t tolen);
66 extern idn_result_t
67 mdn_decodename(int actions, const char *from, char *to, size_t tolen);
69 #define mdn_localtoutf8(from, to, tolen) \
70 mdn_encodename(IDN_LOCALCONV, from, to, len)
71 #define mdn_delimitermap(from, to, tolen) \
72 mdn_encodename(IDN_DELIMMAP, from, to, len)
73 #define mdn_localmap(from, to, tolen) \
74 mdn_encodename(IDN_LOCALMAP, from, to, len)
75 #define mdn_nameprep(from, to, tolen) \
76 mdn_encodename(IDN_NAMEPREP, from, to, len)
77 #define mdn_utf8toidn(from, to, tolen) \
78 mdn_encodename(IDN_IDNCONV, from, to, len)
79 #define mdn_idntoutf8(from, to, tolen) \
80 mdn_decodename(IDN_IDNCONV, from, to, tolen)
81 #define mdn_utf8tolocal(from, to, tolen) \
82 mdn_decodename(IDN_LOCALCONV, from, to, tolen)
84 #define mdn_localtoidn(from, to, tolen) \
85 mdn_encodename(IDN_ENCODE_APP, from, to, tolen)
86 #define mdn_idntolocal(from, to, tolen) \
87 mdn_decodename(IDN_DECODE_APP, from, to, tolen)
89 #ifdef __cplusplus
91 #endif
93 #endif /* MDN_API_H */