1 /* $Id: util.h,v 1.1.1.1 2003/06/04 00:25:44 marka Exp $ */
3 * Copyright (c) 2000,2002 Japan Network Information Center.
6 * By using this file, you agree to the terms and conditions set forth bellow.
8 * LICENSE TERMS AND CONDITIONS
10 * The following License Terms and Conditions apply, unless a different
11 * license is obtained from Japan Network Information Center ("JPNIC"),
12 * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
13 * Chiyoda-ku, Tokyo 101-0047, Japan.
15 * 1. Use, Modification and Redistribution (including distribution of any
16 * modified or derived work) in source and/or binary forms is permitted
17 * under this License Terms and Conditions.
19 * 2. Redistribution of source code must retain the copyright notices as they
20 * appear in each source code file, this License Terms and Conditions.
22 * 3. Redistribution in binary form must reproduce the Copyright Notice,
23 * this License Terms and Conditions, in the documentation and/or other
24 * materials provided with the distribution. For the purposes of binary
25 * distribution the "Copyright Notice" refers to the following language:
26 * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
28 * 4. The name of JPNIC may not be used to endorse or promote products
29 * derived from this Software without specific prior written approval of
32 * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
35 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
39 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
41 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
42 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
59 * These functions examine whether `str' begins with `prefix'.
60 * They disregard the case difference of ASCII letters ([A-Za-z]).
61 * They return 1 if `str' has the ACE prefix, 0 otherwise.
64 idn__util_asciihaveaceprefix(const char *str, const char *prefix);
66 idn__util_ucs4haveaceprefix(const unsigned long *str, const char *prefix);
69 * Check if all codepoints in the UCS4 string `str' are in the ASCII
70 * range (i.e. U+0000...U+007F).
72 * The function return 1 if it is, 0 otherwise.
75 idn__util_ucs4isasciirange(const unsigned long *str);
78 * Get registry information from the system. (Windows only)
85 idn__util_hkey_currentuser,
86 idn__util_hkey_localmachine
90 idn__util_getregistrystring(idn__util_hkey_t topkey, const char *name,
91 char *str, size_t length);
98 #endif /* IDN_UTIL_H */