Make #include's explicit.
[libidn.git] / lib / internal.h
blob6f33da20258e55af4647a376f8f589c54698a99b
1 /* internal.h Internal header file for libidn.
2 * Copyright (C) 2002, 2003 Simon Josefsson
4 * This file is part of GNU Libidn.
6 * GNU Libidn is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * GNU Libidn is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with GNU Libidn; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _INTERNAL_H
23 #define _INTERNAL_H
25 #ifdef _LIBC
27 # include <stdio.h>
28 # include <stdlib.h>
29 # include <string.h>
30 # include <errno.h>
31 # include <string.h>
33 # define HAVE_ICONV 1
34 # define LOCALE_WORKS 1
35 # define ICONV_CONST
37 #else /* _LIBC */
39 # if HAVE_CONFIG_H
40 # include "config.h"
41 # endif
43 # if STDC_HEADERS
44 # include <stdio.h>
45 # include <stdlib.h>
46 # include <stdarg.h>
47 # include <ctype.h>
48 # include <string.h>
49 # endif
51 # if HAVE_UNISTD_H
52 # include <unistd.h>
53 # endif
55 # if HAVE_ERRNO_H
56 # include <errno.h>
57 # endif
59 #endif /* _LIBC */
61 #include "stringprep.h"
62 #include "punycode.h"
63 #include "idna.h"
65 /*! \mainpage GNU Internationalized Domain Name Library
67 * \section intro Introduction
69 * GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
70 * specifications defined by the IETF Internationalized Domain Names
71 * (IDN) working group, used for internationalized domain names. The
72 * package is available under the GNU Lesser General Public License.
74 * The library contains a generic Stringprep implementation that does
75 * Unicode 3.2 NFKC normalization, mapping and prohibitation of
76 * characters, and bidirectional character handling. Profiles for iSCSI,
77 * Kerberos 5, Nameprep, SASL and XMPP are included. Punycode and ASCII
78 * Compatible Encoding (ACE) via IDNA are supported.
80 * The Stringprep API consists of two main functions, one for converting
81 * data from the system's native representation into UTF-8, and one
82 * function to perform the Stringprep processing. Adding a new
83 * Stringprep profile for your application within the API is
84 * straightforward. The Punycode API consists of one encoding function
85 * and one decoding function. The IDNA API consists of the ToASCII and
86 * ToUnicode functions, as well as an high-level interface for converting
87 * entire domain names to and from the ACE encoded form.
89 * The library is used by, e.g., GNU SASL and Shishi to process user
90 * names and passwords. Libidn can be built into GNU Libc to enable a
91 * new system-wide getaddrinfo() flag for IDN processing.
93 * Libidn is developed for the GNU/Linux system, but runs on over 20 Unix
94 * platforms (including Solaris, IRIX, AIX, and Tru64) and Windows.
95 * Libidn is written in C and (parts of) the API is accessible from C,
96 * C++, Emacs Lisp, Python and Java.
98 * The project web page:\n
99 * http://www.gnu.org/software/libidn/
101 * The software archive:\n
102 * ftp://alpha.gnu.org/pub/gnu/libidn/
104 * For more information see:\n
105 * http://www.ietf.org/html.charters/idn-charter.html\n
106 * http://www.ietf.org/rfc/rfc3454.txt (stringprep specification)\n
107 * http://www.ietf.org/rfc/rfc3490.txt (idna specification)\n
108 * http://www.ietf.org/rfc/rfc3491.txt (nameprep specification)\n
109 * http://www.ietf.org/rfc/rfc3492.txt (punycode specification)\n
110 * http://www.ietf.org/internet-drafts/draft-ietf-ips-iscsi-string-prep-04.txt\n
111 * http://www.ietf.org/internet-drafts/draft-ietf-krb-wg-utf8-profile-01.txt\n
112 * http://www.ietf.org/internet-drafts/draft-ietf-sasl-anon-00.txt\n
113 * http://www.ietf.org/internet-drafts/draft-ietf-sasl-saslprep-00.txt\n
114 * http://www.ietf.org/internet-drafts/draft-ietf-xmpp-nodeprep-01.txt\n
115 * http://www.ietf.org/internet-drafts/draft-ietf-xmpp-resourceprep-01.txt\n
117 * Further information and paid contract development:\n
118 * Simon Josefsson <simon@josefsson.org>
120 * \section examples Examples
122 * \include example.c
123 * \include example3.c
124 * \include example4.c
127 #endif /* _INTERNAL_H */